From 0b0cbbef75021134c83be0c3dd21878467e11144 Mon Sep 17 00:00:00 2001 From: raj Date: Fri, 30 Oct 2015 15:37:12 +0000 Subject: [PATCH] Some include file changes via/inspired-by Elliott Hughes --- AUTHORS | 2 ++ config.h.in | 3 +++ configure | 2 +- configure.ac | 2 +- src/net_uuid.c | 4 ++++ src/netlib.h | 4 ++++ 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 4dae415..dca4c9c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -308,3 +308,5 @@ the UDP socket connected at the netserver side. Weijia Song - a fix inspiration for a NULL pointer problem. Gisle Vanem - some Windows compilation fixes + +Elliott Hughes - some fixes for Android compilation \ No newline at end of file diff --git a/config.h.in b/config.h.in index d1120da..4df6437 100644 --- a/config.h.in +++ b/config.h.in @@ -226,6 +226,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SENDFILE_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H diff --git a/configure b/configure index 8fd2227..d7446d0 100755 --- a/configure +++ b/configure @@ -4553,7 +4553,7 @@ fi done -for ac_header in arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h linux/socket.h malloc.h netdb.h netinet/in.h netinet/sctp.h sched.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h netinet/in_systm.h netinet/ip.h +for ac_header in arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h linux/socket.h malloc.h netdb.h netinet/in.h netinet/sctp.h sched.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h netinet/in_systm.h netinet/ip.h sys/sendfile.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/configure.ac b/configure.ac index caba026..e4bfbbc 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT # lets keep this in some semblence of alphabetical order -AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h linux/socket.h malloc.h netdb.h netinet/in.h netinet/sctp.h sched.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h netinet/in_systm.h netinet/ip.h]) +AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h linux/socket.h malloc.h netdb.h netinet/in.h netinet/sctp.h sched.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h netinet/in_systm.h netinet/ip.h sys/sendfile.h]) # Some platforms require these. There may be a better way. AC_HAVE_LIBRARY(socket) diff --git a/src/net_uuid.c b/src/net_uuid.c index 8701120..fd14db4 100644 --- a/src/net_uuid.c +++ b/src/net_uuid.c @@ -29,6 +29,10 @@ #include #include +#if defined(HAVE_UNISTD_H) +#include +#endif + #if defined(HAVE_INTTYPES_H) #include #endif diff --git a/src/netlib.h b/src/netlib.h index 79f11c9..0b8081a 100644 --- a/src/netlib.h +++ b/src/netlib.h @@ -434,6 +434,10 @@ extern void PrintWin32Error(FILE *stream, LPSTR text); (((return_value) == SOCKET_ERROR) && (errno == WSAEWOULDBLOCK)) #endif +#if defined(HAVE_SYS_SENDFILE_H) +#include +#endif + #ifdef HAVE_SENDFILE #endif /* HAVE_SENDFILE */