diff --git a/ares/acinclude.m4 b/ares/acinclude.m4 index 2f6256ae4..f4f317eae 100644 --- a/ares/acinclude.m4 +++ b/ares/acinclude.m4 @@ -242,26 +242,6 @@ AC_DEFUN([CARES_CHECK_STRUCT], [ fi ]) -dnl This macro determins if the specified struct contains a specific member. -dnl Syntax: -dnl CARES_CHECK_STRUCT_MEMBER(headers, struct name, member name, if found, [if not found]) - -AC_DEFUN([CARES_CHECK_STRUCT_MEMBER], [ - AC_MSG_CHECKING([if struct $2 has member $3]) - AC_TRY_COMPILE([$1], - [ - struct $2 struct_instance; - struct_instance.$3 = 0; - ], ac_struct="yes", ac_found="no") - if test "$ac_struct" = "yes" ; then - AC_MSG_RESULT(yes) - $4 - else - AC_MSG_RESULT(no) - $5 - fi -]) - dnl This macro determines if the specified constant exists in the specified file dnl Syntax: dnl CARES_CHECK_CONSTANT(headers, constant name, if found, [if not found]) diff --git a/ares/configure.ac b/ares/configure.ac index 73901394a..271dfeb4f 100644 --- a/ares/configure.ac +++ b/ares/configure.ac @@ -176,7 +176,10 @@ CARES_CHECK_STRUCT( ) if test "$ac_have_sockaddr_in6" = "yes" ; then -CARES_CHECK_STRUCT_MEMBER( +AC_CHECK_MEMBER(struct sockaddr_in6.sin6_scope_id, + AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID,1, + [Define to 1 if your struct sockaddr_in6 has sin6_scope_id.]) + , , [ #ifdef HAVE_SYS_TYPES_H #include @@ -188,8 +191,6 @@ CARES_CHECK_STRUCT_MEMBER( #include #endif ], [sockaddr_in6], [sin6_scope_id], - AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID,1, - [Define to 1 if your struct sockaddr_in6 has sin6_scope_id.]) ) fi