From 68ce6b4a9b90d4d53310c4271e6011b796fc1bff Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Wed, 19 May 2010 19:57:10 -0700 Subject: [PATCH] Add additional conditionalization of networking includes --- configure.ac | 2 +- gnuradio-core/src/lib/io/gr_udp_sink.cc | 5 +++++ gnuradio-core/src/lib/io/gr_udp_source.cc | 6 ++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a1709338..5200059e 100644 --- a/configure.ac +++ b/configure.ac @@ -170,9 +170,9 @@ AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h limits.h strings.h time.h sys/ioctl.h sys/time.h unistd.h) AC_CHECK_HEADERS(linux/ppdev.h dev/ppbus/ppi.h sys/mman.h sys/select.h sys/types.h) AC_CHECK_HEADERS(sys/resource.h stdint.h sched.h signal.h sys/syscall.h malloc.h) -AC_CHECK_HEADERS(netinet/in.h) AC_CHECK_HEADERS(windows.h) AC_CHECK_HEADERS(vec_types.h) +AC_CHECK_HEADERS(netdb.h netinet/in.h arpa/inet.h sys/types.h sys/socket.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.cc b/gnuradio-core/src/lib/io/gr_udp_sink.cc index a323aef9..73e6d028 100755 --- a/gnuradio-core/src/lib/io/gr_udp_sink.cc +++ b/gnuradio-core/src/lib/io/gr_udp_sink.cc @@ -31,7 +31,12 @@ #include #if defined(HAVE_NETDB_H) #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H #include //usually included by ? +#endif typedef void* optval_t; #elif defined(HAVE_WINDOWS_H) // if not posix, assume winsock diff --git a/gnuradio-core/src/lib/io/gr_udp_source.cc b/gnuradio-core/src/lib/io/gr_udp_source.cc index 880388e5..15f83892 100755 --- a/gnuradio-core/src/lib/io/gr_udp_source.cc +++ b/gnuradio-core/src/lib/io/gr_udp_source.cc @@ -32,6 +32,12 @@ #if defined(HAVE_NETDB_H) #include +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif typedef void* optval_t; // ntohs() on FreeBSD may require both netinet/in.h and arpa/inet.h, in order -- 2.30.2