aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitb3d021af18b2745d4a2594b05bc4e605d918a9e3 (patch)
treeeebee3b5d5f59cd9135567e1efe2560a0b7e505a /test-cmsg.c
parent05ede23b72a253dad7a9e6f68dc14d4f2a1ea3c2 (diff)
downloadmandoc-b3d021af18b2745d4a2594b05bc4e605d918a9e3.tar.gz
mandoc-b3d021af18b2745d4a2594b05bc4e605d918a9e3.tar.zst
mandoc-b3d021af18b2745d4a2594b05bc4e605d918a9e3.zip
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;
+}