summaryrefslogtreecommitdiff
path: root/src/sysdeps/trymsgdontwait.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-21 00:26:40 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-21 00:26:40 +0000
commit23bdcb4ad4ef19d99b729e5282fd15df6300a3b5 (patch)
treebc1976b67844d3070b0cd2bbecf5103ece86024d /src/sysdeps/trymsgdontwait.c
parent828159d33b8ced9e016470c61ffd66bbef048e06 (diff)
downloadskalibs-23bdcb4ad4ef19d99b729e5282fd15df6300a3b5.tar.xz
So the non-portable MSG_DONTWAIT may alleviate the problem... might
as well use it on architectures that support it.
Diffstat (limited to 'src/sysdeps/trymsgdontwait.c')
-rw-r--r--src/sysdeps/trymsgdontwait.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sysdeps/trymsgdontwait.c b/src/sysdeps/trymsgdontwait.c
new file mode 100644
index 0000000..0c8ad15
--- /dev/null
+++ b/src/sysdeps/trymsgdontwait.c
@@ -0,0 +1,17 @@
+/* ISC license. */
+
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
+
+#ifndef _XPG4_2
+# define _XPG4_2
+#endif
+
+#ifndef _BSD_SOURCE
+#define _BSD_SOURCE
+#endif
+
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int value = MSG_DONTWAIT ;