diff --git a/configure b/configure index 3807a70a9a8..f3eec772842 100755 --- a/configure +++ b/configure @@ -13429,6 +13429,23 @@ _ACEOF fi +ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NET_IF_H +# include +#endif +" +if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = x""yes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 +_ACEOF + + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for timezone variable" >&5 $as_echo_n "checking for timezone variable... " >&6; } if test "${ac_cv_have_timezone+set}" = set; then : diff --git a/configure.ac b/configure.ac index 8eb37a28a15..e3787eb0679 100644 --- a/configure.ac +++ b/configure.ac @@ -2047,6 +2047,15 @@ AC_CHECK_MEMBERS([struct icmpstat.icps_outhist],,, #include #endif]) +dnl Check for struct ifreq.ifr_hwaddr +AC_CHECK_MEMBERS([struct ifreq.ifr_hwaddr],,, +[#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_NET_IF_H +# include +#endif]) + dnl Check for the external timezone variables timezone and daylight AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone, AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[timezone = 1]])],[ac_cv_have_timezone="yes"],[ac_cv_have_timezone="no"])) diff --git a/dlls/iphlpapi/ifenum.c b/dlls/iphlpapi/ifenum.c index d3482290a76..02c6a9d6363 100644 --- a/dlls/iphlpapi/ifenum.c +++ b/dlls/iphlpapi/ifenum.c @@ -298,7 +298,7 @@ static DWORD getInterfaceMaskByName(const char *name) return ret; } -#if defined (SIOCGIFHWADDR) +#if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR) static DWORD getInterfacePhysicalByName(const char *name, PDWORD len, PBYTE addr, PDWORD type) { diff --git a/include/config.h.in b/include/config.h.in index 7c34980ad92..fb8a79b35f8 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -777,6 +777,9 @@ /* Define to 1 if `icps_outhist' is a member of `struct icmpstat'. */ #undef HAVE_STRUCT_ICMPSTAT_ICPS_OUTHIST +/* Define to 1 if `ifr_hwaddr' is a member of `struct ifreq'. */ +#undef HAVE_STRUCT_IFREQ_IFR_HWADDR + /* Define to 1 if `msg_accrights' is a member of `struct msghdr'. */ #undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS