cmake: Only build test_sendmsg_recvmsg_fd if we have msg_control.
authorAndreas Schneider <asn@samba.org>
Tue, 21 Jan 2014 08:52:06 +0000 (09:52 +0100)
committerAndreas Schneider <asn@samba.org>
Tue, 21 Jan 2014 08:52:06 +0000 (09:52 +0100)
tests/CMakeLists.txt

index c626c0249855eef5c02171da06b5b37668bf41d1..53d458c1bcfb608f46f9a8ac81f06447e0ddbe10 100644 (file)
@@ -25,8 +25,11 @@ set(SWRAP_TESTS
     test_echo_tcp_writev_readv
     test_echo_udp_sendto_recvfrom
     test_echo_udp_send_recv
-    test_echo_udp_sendmsg_recvmsg
-    test_sendmsg_recvmsg_fd)
+    test_echo_udp_sendmsg_recvmsg)
+
+if (HAVE_STRUCT_MSGHDR_MSG_CONTROL)
+    set(SWRAP_TESTS ${SWRAP_TESTS} test_sendmsg_recvmsg_fd)
+endif (HAVE_STRUCT_MSGHDR_MSG_CONTROL)
 
 foreach(_SWRAP_TEST ${SWRAP_TESTS})
     add_cmocka_test(${_SWRAP_TEST} ${_SWRAP_TEST}.c ${TORTURE_LIBRARY})