aboutsummaryrefslogtreecommitdiff
path: root/m4/curl-functions.m4
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-11-20 07:59:26 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-11-20 07:59:26 +0000
commit32634b0771dbaf6f0e06c916955cee62a606ee28 (patch)
tree0dbbf49aced1a5cb53856358ba765a3b93775d4b /m4/curl-functions.m4
parentc97b66287c41952a2fcb908805768284af3a8e65 (diff)
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.
Diffstat (limited to 'm4/curl-functions.m4')
-rw-r--r--m4/curl-functions.m410
1 files changed, 6 insertions, 4 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index f1a783b1d..4935879bc 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -2649,9 +2649,9 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_FIONBIO], [
dnl CURL_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([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
@@ -2664,8 +2664,10 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_stropts
+ #include <net/if.h>
]],[[
- if(0 != ioctl(0, SIOCGIFADDR, 0))
+ struct ifreq ifr;
+ if(0 != ioctl(0, SIOCGIFADDR, &ifr))
return 1;
]])
],[