Add additional conditionalization of networking includes
authorEric Blossom <eb@comsec.com>
Thu, 20 May 2010 02:57:10 +0000 (19:57 -0700)
committerEric Blossom <eb@comsec.com>
Thu, 20 May 2010 02:57:10 +0000 (19:57 -0700)
configure.ac
gnuradio-core/src/lib/io/gr_udp_sink.cc
gnuradio-core/src/lib/io/gr_udp_source.cc

index a170933858129292469d33c743192dabc54b2248..5200059e4e3e2ffe3a67665366a421ee1bb45cc5 100644 (file)
@@ -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
index a323aef986d940b9b5b3a591497a48077faa91a6..73e6d028337820c6f0303924deaf97d385de9f25 100755 (executable)
 #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
index 880388e5e3e90fbf958616f7dcb779eed8eddf4d..15f83892ca46045330cfdc1617377f775cdacf87 100755 (executable)
 
 #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