Add configure check for <sys/sockio.h>

Some systems need <sys/sockio.h> for the SIOCGIFCONF ioctl - this switches
to using a proper configure check for that header rather than just assuming
it'll be there if we can't find SIOCGIFCONF.  Should be more robust.
This commit is contained in:
Kevin Easton
2016-03-20 23:48:31 +11:00
parent 94f4e1c2a3
commit 83741aca7a
5 changed files with 10 additions and 5 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2.2] [Changes 1.2.2]
* Add configure check for <sys/sockio.h>. (caf)
* Improve /WINDOW DESCRIBE output a little. (caf) * Improve /WINDOW DESCRIBE output a little. (caf)
* If we can't create a socket for the first address returned by getaddrinfo(), * If we can't create a socket for the first address returned by getaddrinfo(),

3
configure vendored
View File

@@ -3979,7 +3979,8 @@ done
for ac_header in sys/socket.h sys/time.h sys/fcntl.h fcntl.h sys/file.h netinet/in.h netdb.h sys/un.h sys/filio.h regex.h arpa/nameser.h dirent.h sys/ndir.h sys/dir.h ndir.h termios.h
for ac_header in sys/socket.h sys/sockio.h sys/time.h sys/fcntl.h fcntl.h sys/file.h netinet/in.h netdb.h sys/un.h sys/filio.h regex.h arpa/nameser.h dirent.h sys/ndir.h sys/dir.h ndir.h termios.h
do do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then if eval "test \"\${$as_ac_Header+set}\" = set"; then

View File

@@ -56,7 +56,7 @@ AC_CHECK_LIB(m, pow, LIBS="-lm $LIBS",)
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT
AC_CHECK_HEADERS([sys/socket.h sys/time.h sys/fcntl.h fcntl.h sys/file.h netinet/in.h netdb.h sys/un.h sys/filio.h regex.h arpa/nameser.h dirent.h sys/ndir.h sys/dir.h ndir.h termios.h]) AC_CHECK_HEADERS([sys/socket.h sys/sockio.h sys/time.h sys/fcntl.h fcntl.h sys/file.h netinet/in.h netdb.h sys/un.h sys/filio.h regex.h arpa/nameser.h dirent.h sys/ndir.h sys/dir.h ndir.h termios.h])
AC_CHECK_HEADERS([net/if.h], [], [], AC_CHECK_HEADERS([net/if.h], [], [],
[AC_INCLUDES_DEFAULT [AC_INCLUDES_DEFAULT

View File

@@ -279,6 +279,9 @@
/* Define to 1 if you have the <sys/socket.h> header file. */ /* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H #undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
/* Define to 1 if you have the <sys/soundcard.h> header file. */ /* Define to 1 if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H #undef HAVE_SYS_SOUNDCARD_H

View File

@@ -24,11 +24,10 @@ CVS_REVISION(commands_c)
#else /* IPV6 */ #else /* IPV6 */
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h>
#ifndef SIOCGIFCONF #ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h> #include <sys/sockio.h>
#endif /* SIOCGIFCONF */ #endif /* HAVE_SYS_SOCKIO_H */
/* Some systems call it SIOCGIFCONF, some call it OSIOCGIFCONF */ /* Some systems call it SIOCGIFCONF, some call it OSIOCGIFCONF */
#if defined(OSIOCGIFCONF) #if defined(OSIOCGIFCONF)