summaryrefslogtreecommitdiffstats
path: root/test-cmsg.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-02-08 16:11:40 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-02-08 16:11:40 +0000
commitedee96dbbd1fe1048c27593e4715416ad8c33a8d (patch)
treef30203e66e184bb14c9a81677c4af8fcdce1e40e /test-cmsg.c
parentaacdfe141671caa7d98ac298e29d429286e00f4f (diff)
downloadmandoc-edee96dbbd1fe1048c27593e4715416ad8c33a8d.tar.gz
config glue for recvmsg(2) and CMSG_FIRSTHDR(3);
needed for Solaris 11
Diffstat (limited to 'test-cmsg.c')
-rw-r--r--test-cmsg.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test-cmsg.c b/test-cmsg.c
new file mode 100644
index 00000000..b5441f9c
--- /dev/null
+++ b/test-cmsg.c
@@ -0,0 +1,13 @@
+#include <stddef.h>
+#include <sys/socket.h>
+
+int
+main(void)
+{
+ struct msghdr msg;
+
+ msg.msg_control = NULL;
+ msg.msg_controllen = 0;
+
+ return CMSG_FIRSTHDR(&msg) != NULL;
+}