diff options
| author | Michael Adam <obnox@samba.org> | 2014-06-01 01:48:15 +0200 |
|---|---|---|
| committer | Michael Adam <obnox@samba.org> | 2014-06-01 10:02:56 +0200 |
| commit | 3029067b21775c1f6fec43e0b03712defa69e9a6 (patch) | |
| tree | 1375d6897f11bf14403e0c6edea868f816a2dc7a | |
| parent | 00258577e86f4b6c15d504954ee6233086638a3e (diff) | |
| download | socket_wrapper-3029067b21775c1f6fec43e0b03712defa69e9a6.tar.gz socket_wrapper-3029067b21775c1f6fec43e0b03712defa69e9a6.tar.xz socket_wrapper-3029067b21775c1f6fec43e0b03712defa69e9a6.zip | |
swrap: add check for rpc/rpc.h - needed on freebsd for bindresvport
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
| -rw-r--r-- | ConfigureChecks.cmake | 1 | ||||
| -rw-r--r-- | config.h.cmake | 1 | ||||
| -rw-r--r-- | src/socket_wrapper.c | 3 | ||||
| -rw-r--r-- | tests/test_echo_tcp_bind.c | 3 |
4 files changed, 8 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 44914f0..df65411 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -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) diff --git a/config.h.cmake b/config.h.cmake index b5dd8c9..466b951 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -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 ****************************/ diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index bf84dbe..523b32a 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -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, diff --git a/tests/test_echo_tcp_bind.c b/tests/test_echo_tcp_bind.c index b3f2656..e1c55ef 100644 --- a/tests/test_echo_tcp_bind.c +++ b/tests/test_echo_tcp_bind.c @@ -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) { |
