[glib: 4/5] gsocket: Decrease msg_control buffer size for QNX
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 4/5] gsocket: Decrease msg_control buffer size for QNX
- Date: Wed, 20 Jan 2021 12:28:55 +0000 (UTC)
commit 9204c346d4e8b227719ee28a2baf531fbdaa0dac
Author: s1341 <github shmarya net>
Date: Sun Aug 7 18:31:56 2016 +0200
gsocket: Decrease msg_control buffer size for QNX
gio/gsocket.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/gio/gsocket.c b/gio/gsocket.c
index 3a02dccde..52a198378 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -4486,6 +4486,15 @@ g_socket_condition_timed_wait (GSocket *socket,
#ifndef G_OS_WIN32
+#ifdef HAVE_QNX
+/* QNX has this weird upper limit, or at least used to back in the 6.x days.
+ * This was discovered empirically and doesn't appear to be mentioned in any
+ * of the official documentation. */
+# define G_SOCKET_CONTROL_BUFFER_SIZE_BYTES 2016
+#else
+# define G_SOCKET_CONTROL_BUFFER_SIZE_BYTES 2048
+#endif
+
/* Unfortunately these have to be macros rather than inline functions due to
* using alloca(). */
#define output_message_to_msghdr(message, prev_message, msg, prev_msg, error) \
@@ -4632,7 +4641,7 @@ G_STMT_START { \
} \
else \
{ \
- _msg->msg_controllen = 2048; \
+ _msg->msg_controllen = G_SOCKET_CONTROL_BUFFER_SIZE_BYTES; \
_msg->msg_control = g_alloca (_msg->msg_controllen); \
} \
\
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]