[glib: 1/2] Define G_IOV_MAX to 512 on macOS/iOS
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [glib: 1/2] Define G_IOV_MAX to 512 on macOS/iOS
- Date: Fri, 13 Sep 2019 13:37:41 +0000 (UTC)
commit 81f614533d48dbaa77527ec0c16472adcdae48e8
Author: Sebastian Dröge <sebastian centricular com>
Date:   Sat Sep 7 19:42:00 2019 +0300
    Define G_IOV_MAX to 512 on macOS/iOS
    
    For macOS/iOS, UIO_MAXIOV is documented in writev(2), but <sys/uio.h> only
    declares it if defined(KERNEL)
    
    Inspired by a GStreamer MR by Jim Mason
    https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/277
 gio/gioprivate.h | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/gio/gioprivate.h b/gio/gioprivate.h
index 2bc54e49b..608d912c0 100644
--- a/gio/gioprivate.h
+++ b/gio/gioprivate.h
@@ -43,6 +43,10 @@ void g_socket_connection_set_cached_remote_address (GSocketConnection *connectio
 #define G_IOV_MAX IOV_MAX
 #elif defined(UIO_MAXIOV)
 #define G_IOV_MAX UIO_MAXIOV
+#elif defined(__APPLE__)
+/* For macOS/iOS, UIO_MAXIOV is documented in writev(2), but <sys/uio.h>
+ * only declares it if defined(KERNEL) */
+#define G_IOV_MAX 512
 #else
 /* 16 is the minimum value required by POSIX */
 #define G_IOV_MAX 16
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]