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.
This commit is contained in:
@@ -1545,9 +1545,9 @@ AC_DEFUN([CARES_CHECK_FUNC_IOCTL_FIONBIO], [
|
|||||||
|
|
||||||
dnl CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR
|
dnl CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Verify if ioctl with the SIOCGIFADDR command is
|
dnl Verify if ioctl with the SIOCGIFADDR command is available,
|
||||||
dnl available, can be compiled, and seems to work. If
|
dnl struct ifreq is defined, they can be compiled, and seem to
|
||||||
dnl all of these are true, then HAVE_IOCTL_SIOCGIFADDR
|
dnl work. If all of these are true, then HAVE_IOCTL_SIOCGIFADDR
|
||||||
dnl will be defined.
|
dnl will be defined.
|
||||||
|
|
||||||
AC_DEFUN([CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
|
AC_DEFUN([CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
|
||||||
@@ -1560,8 +1560,10 @@ AC_DEFUN([CARES_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
$cares_includes_stropts
|
$cares_includes_stropts
|
||||||
|
#include <net/if.h>
|
||||||
]],[[
|
]],[[
|
||||||
if(0 != ioctl(0, SIOCGIFADDR, 0))
|
struct ifreq ifr;
|
||||||
|
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|
||||||
return 1;
|
return 1;
|
||||||
]])
|
]])
|
||||||
],[
|
],[
|
||||||
|
|||||||
@@ -2649,9 +2649,9 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_FIONBIO], [
|
|||||||
|
|
||||||
dnl CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR
|
dnl CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR
|
||||||
dnl -------------------------------------------------
|
dnl -------------------------------------------------
|
||||||
dnl Verify if ioctl with the SIOCGIFADDR command is
|
dnl Verify if ioctl with the SIOCGIFADDR command is available,
|
||||||
dnl available, can be compiled, and seems to work. If
|
dnl struct ifreq is defined, they can be compiled, and seem to
|
||||||
dnl all of these are true, then HAVE_IOCTL_SIOCGIFADDR
|
dnl work. If all of these are true, then HAVE_IOCTL_SIOCGIFADDR
|
||||||
dnl will be defined.
|
dnl will be defined.
|
||||||
|
|
||||||
AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
|
AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
|
||||||
@@ -2664,8 +2664,10 @@ AC_DEFUN([CURL_CHECK_FUNC_IOCTL_SIOCGIFADDR], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
$curl_includes_stropts
|
$curl_includes_stropts
|
||||||
|
#include <net/if.h>
|
||||||
]],[[
|
]],[[
|
||||||
if(0 != ioctl(0, SIOCGIFADDR, 0))
|
struct ifreq ifr;
|
||||||
|
if(0 != ioctl(0, SIOCGIFADDR, &ifr))
|
||||||
return 1;
|
return 1;
|
||||||
]])
|
]])
|
||||||
],[
|
],[
|
||||||
|
|||||||
Reference in New Issue
Block a user