swrap: add check for rpc/rpc.h - needed on freebsd for bindresvport
authorMichael Adam <obnox@samba.org>
Sat, 31 May 2014 23:48:15 +0000 (01:48 +0200)
committerMichael Adam <obnox@samba.org>
Sun, 1 Jun 2014 08:02:56 +0000 (10:02 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
ConfigureChecks.cmake
config.h.cmake
src/socket_wrapper.c
tests/test_echo_tcp_bind.c

index 44914f02c67b73d97af2a41cb19fb781c3f3b998..df65411bc1c808ca4915f00939bf86353038fe78 100644 (file)
@@ -52,6 +52,7 @@ check_include_file(sys/signalfd.h HAVE_SYS_SIGNALFD_H)
 check_include_file(sys/eventfd.h HAVE_SYS_EVENTFD_H)
 check_include_file(sys/timerfd.h HAVE_SYS_TIMERFD_H)
 check_include_file(gnu/lib-names.h HAVE_GNU_LIB_NAMES_H)
+check_include_file(rpc/rpc.h HAVE_RPC_RPC_H)
 
 # FUNCTIONS
 check_function_exists(strncpy HAVE_STRNCPY)
index b5dd8c9bc55cb009f79f02b89746b96f7a096553..466b9510872b4c3f104455024ce937423f93ed9f 100644 (file)
@@ -19,6 +19,7 @@
 #cmakedefine HAVE_SYS_EVENTFD_H 1
 #cmakedefine HAVE_SYS_TIMERFD_H 1
 #cmakedefine HAVE_GNU_LIB_NAMES_H 1
+#cmakedefine HAVE_RPC_RPC_H 1
 
 /**************************** STRUCTS ****************************/
 
index bf84dbe516954f3ec94a33164a73d032c1c6377a..523b32a780e2b719d9e7f8f22a6ae7627e828d31 100644 (file)
@@ -76,6 +76,9 @@
 #ifdef HAVE_GNU_LIB_NAMES_H
 #include <gnu/lib-names.h>
 #endif
+#ifdef HAVE_RPC_RPC_H
+#include <rpc/rpc.h>
+#endif
 
 enum swrap_dbglvl_e {
        SWRAP_LOG_ERROR = 0,
index b3f265641a45b6210e3203c6bb2ee2c2b9f8b9df..e1c55ef1550deb0266394ef0c96a507b423a9090 100644 (file)
@@ -14,6 +14,9 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
+#ifdef HAVE_RPC_RPC_H
+#include <rpc/rpc.h>
+#endif
 
 static void setup_echo_srv_tcp_ipv4(void **state)
 {