From 32634b0771dbaf6f0e06c916955cee62a606ee28 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 20 Nov 2008 07:59:26 +0000 Subject: Make checking for struct ifreq a prerequisite for setting HAVE_IOCTL_SIOCGIFADDR since it's needed to use SIOCGIFADDR and Watcom C doesn't currently define it. --- ares/m4/cares-functions.m4 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ares') diff --git a/ares/m4/cares-functions.m4 b/ares/m4/cares-functions.m4 index 5cfc35ab3..b625e0378 100644 --- a/ares/m4/cares-functions.m4 +++ b/ares/m4/cares-functions.m4 @@ -1545,9 +1545,9 @@ AC_DEFUN([CARES_CHECK_FUNC_IOCTL_FIONBIO], [ dnl CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR dnl ------------------------------------------------- -dnl Verify if ioctl with the SIOCGIFADDR command is -dnl available, can be compiled, and seems to work. If -dnl all of these are true, then HAVE_IOCTL_SIOCGIFADDR +dnl Verify if ioctl with the SIOCGIFADDR command is available, +dnl struct ifreq is defined, they can be compiled, and seem to +dnl work. If all of these are true, then HAVE_IOCTL_SIOCGIFADDR dnl will be defined. AC_DEFUN([CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR], [ @@ -1560,8 +1560,10 @@ AC_DEFUN([CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[ $cares_includes_stropts + #include ]],[[ - if(0 != ioctl(0, SIOCGIFADDR, 0)) + struct ifreq ifr; + if(0 != ioctl(0, SIOCGIFADDR, &ifr)) return 1; ]]) ],[ -- cgit v1.2.3