Skip to content

Commit

Permalink
Some more configure checks for headers
Browse files Browse the repository at this point in the history
  • Loading branch information
sahlberg committed May 29, 2013
1 parent 7057e73 commit bff8fe4
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 20 deletions.
12 changes: 12 additions & 0 deletions configure.ac
Expand Up @@ -89,6 +89,18 @@ AC_CHECK_HEADERS([poll.h])
dnl Check for unistd.h
AC_CHECK_HEADERS([unistd.h])

# check for netdb.h
dnl Check for netdb.h
AC_CHECK_HEADERS([netdb.h])

# check for utime.h
dnl Check for utime.h
AC_CHECK_HEADERS([utime.h])

# check for net/if.h
dnl Check for net/if.h
AC_CHECK_HEADERS([net/if.h])

# check for sys/ioctl.h
dnl Check for sys/ioctl.h
AC_CHECK_HEADERS([sys/ioctl.h])
Expand Down
6 changes: 6 additions & 0 deletions examples/nfsclient-bcast.c
Expand Up @@ -38,8 +38,14 @@
#include <string.h>
#include <errno.h>
#include <sys/time.h>

#ifdef HAVE_NET_IF_H
#include <net/if.h>
#endif

#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
Expand Down
9 changes: 6 additions & 3 deletions lib/init.c
Expand Up @@ -21,15 +21,18 @@

#ifdef WIN32
#include "win32_compat.h"
#else
#include <strings.h>
#endif/*WIN32*/
#endif

#define _GNU_SOURCE

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif

#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif

#include <stdio.h>
#include <stdarg.h>
#include <string.h>
Expand Down
16 changes: 12 additions & 4 deletions lib/libnfs-sync.c
Expand Up @@ -27,11 +27,11 @@

#ifdef WIN32
#include "win32_compat.h"
#else
#include <strings.h>
#include <netdb.h>
#endif

#ifdef HAVE_NET_IF_H
#include <net/if.h>
#endif /*WIN32*/
#endif

#ifdef ANDROID
#define statvfs statfs
Expand All @@ -57,6 +57,10 @@
#include <poll.h>
#endif

#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
Expand All @@ -65,6 +69,10 @@
#include <netinet/in.h>
#endif

#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
11 changes: 8 additions & 3 deletions lib/libnfs.c
Expand Up @@ -27,10 +27,11 @@

#ifdef WIN32
#include "win32_compat.h"
#else
#include <strings.h>
#endif

#ifdef HAVE_UTIME_H
#include <utime.h>
#endif /*WIN32*/
#endif

#ifdef ANDROID
#define statvfs statfs
Expand All @@ -54,6 +55,10 @@
#include <netinet/in.h>
#endif

#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
Expand Down
8 changes: 5 additions & 3 deletions lib/pdu.c
Expand Up @@ -24,9 +24,7 @@

#ifdef WIN32
#include "win32_compat.h"
#else
#include <strings.h>
#endif/*WIN32*/
#endif

#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
Expand All @@ -36,6 +34,10 @@
#include <sys/socket.h>
#endif

#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down
19 changes: 12 additions & 7 deletions lib/socket.c
Expand Up @@ -26,7 +26,6 @@
#include "win32_compat.h"
#else
#include <arpa/inet.h>
#include <netdb.h>
#endif/*WIN32*/

#ifdef HAVE_POLL_H
Expand All @@ -45,18 +44,24 @@
#include <sys/socket.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#ifdef HAVE_NETDB_H
#include <netdb.h>
#endif

#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif

#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif

#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include "libnfs-zdr.h"
#include "libnfs.h"
Expand Down

0 comments on commit bff8fe4

Please sign in to comment.