summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blossom2010-05-19 19:57:10 -0700
committerEric Blossom2010-05-19 19:57:10 -0700
commit68ce6b4a9b90d4d53310c4271e6011b796fc1bff (patch)
tree65a8e65db79d05819804eb2b4276cddba818d298
parenta61fc516f5deeef67b48a704c5426c3969d36248 (diff)
downloadgnuradio-68ce6b4a9b90d4d53310c4271e6011b796fc1bff.tar.gz
gnuradio-68ce6b4a9b90d4d53310c4271e6011b796fc1bff.tar.bz2
gnuradio-68ce6b4a9b90d4d53310c4271e6011b796fc1bff.zip
Add additional conditionalization of networking includes
-rw-r--r--configure.ac2
-rwxr-xr-xgnuradio-core/src/lib/io/gr_udp_sink.cc5
-rwxr-xr-xgnuradio-core/src/lib/io/gr_udp_source.cc6
3 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index a17093385..5200059e4 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 a323aef98..73e6d0283 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 <string.h>
#if defined(HAVE_NETDB_H)
#include <netdb.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h> //usually included by <netdb.h>?
+#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 880388e5e..15f83892c 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 <netdb.h>
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
typedef void* optval_t;
// ntohs() on FreeBSD may require both netinet/in.h and arpa/inet.h, in order