[Asterisk-code-review] BuildSystem: Resolve resolv.h not via Generic but Particular... (asterisk[15])

Jenkins2 asteriskteam at digium.com
Tue Jan 16 09:55:25 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7964 )

Change subject: BuildSystem: Resolve resolv.h not via Generic but Particular Header-Check.
......................................................................

BuildSystem: Resolve resolv.h not via Generic but Particular Header-Check.

ASTERISK-27585

Change-Id: I27c67563788e6f67eeda5fb51a741823a50a95e2
---
M configure
M configure.ac
2 files changed, 37 insertions(+), 2 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/configure b/configure
index 9ebf268..d47fb88 100755
--- a/configure
+++ b/configure
@@ -13528,11 +13528,41 @@
   as_fn_error $? "*** POSIX.1 compatible sys/wait.h is required." "$LINENO" 5
 fi
 
+for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>   /* inet_ functions / structs */
+#endif
+#ifdef HAVE_ARPA_NAMESER_H
+#  include <arpa/nameser.h> /* DNS HEADER struct */
+#endif
+#ifdef HAVE_NETDB_H
+#  include <netdb.h>
+#endif
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "$ac_cv_header_resolv_h" != "yes"; then
+  as_fn_error $? "*** resolv.h is required." "$LINENO" 5
+fi
+
 # Check for headers that are unconditionally required on all platforms.  Do not use
 # this to check for headers that are only needed by modules.
 for ac_header in  \
   arpa/nameser.h assert.h ctype.h dlfcn.h errno.h fcntl.h float.h grp.h \
-  inttypes.h limits.h locale.h math.h pwd.h netinet/in.h regex.h resolv.h \
+  inttypes.h limits.h locale.h math.h pwd.h netinet/in.h regex.h \
   sched.h stdarg.h stdint.h stdio.h stdlib.h string.h syslog.h \
   sys/file.h sys/ioctl.h sys/param.h sys/resource.h sys/socket.h sys/stat.h \
   sys/time.h sys/types.h sys/un.h \
diff --git a/configure.ac b/configure.ac
index 01ba0e5..2f51f31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -604,11 +604,16 @@
   AC_MSG_ERROR([*** POSIX.1 compatible sys/wait.h is required.])
 fi
 
+AC_HEADER_RESOLV
+if test "$ac_cv_header_resolv_h" != "yes"; then
+  AC_MSG_ERROR([*** resolv.h is required.])
+fi
+
 # Check for headers that are unconditionally required on all platforms.  Do not use
 # this to check for headers that are only needed by modules.
 AC_CHECK_HEADERS([ \
   arpa/nameser.h assert.h ctype.h dlfcn.h errno.h fcntl.h float.h grp.h \
-  inttypes.h limits.h locale.h math.h pwd.h netinet/in.h regex.h resolv.h \
+  inttypes.h limits.h locale.h math.h pwd.h netinet/in.h regex.h \
   sched.h stdarg.h stdint.h stdio.h stdlib.h string.h syslog.h \
   sys/file.h sys/ioctl.h sys/param.h sys/resource.h sys/socket.h sys/stat.h \
   sys/time.h sys/types.h sys/un.h \

-- 
To view, visit https://gerrit.asterisk.org/7964
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I27c67563788e6f67eeda5fb51a741823a50a95e2
Gerrit-Change-Number: 7964
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180116/b24b2995/attachment-0001.html>


More information about the asterisk-code-review mailing list