[asterisk-commits] seanbright: trunk r205214 - in /trunk: ./ include/asterisk/ main/ utils/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 8 11:43:16 CDT 2009


Author: seanbright
Date: Wed Jul  8 11:43:12 2009
New Revision: 205214

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205214
Log:
Fix a few compilation problems found when building Asterisk against uClibc.

Modified:
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/main/dns.c
    trunk/utils/muted.c

Modified: trunk/configure.ac
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/configure.ac?view=diff&rev=205214&r1=205213&r2=205214
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Jul  8 11:43:12 2009
@@ -625,6 +625,25 @@
 				[res_ndestroy(NULL);]),
 		AC_MSG_RESULT(yes)
 		AC_DEFINE([HAVE_RES_NDESTROY], 1, [Define to 1 if your system has the ndestroy resolver function.]),
+		AC_MSG_RESULT(no)
+	)
+	AC_SEARCH_LIBS(res_9_close, resolv)
+	AC_MSG_CHECKING(for res_close)
+	AC_LINK_IFELSE(
+		AC_LANG_PROGRAM([
+				#ifdef HAVE_SYS_SOCKET_H
+				#include <sys/socket.h>
+				#endif
+				#ifdef HAVE_NETINET_IN_H
+				#include <netinet/in.h>
+				#endif
+				#ifdef HAVE_ARPA_NAMESER_H
+				#include <arpa/nameser.h>
+				#endif
+				#include <resolv.h>],
+				[res_close();]),
+		AC_MSG_RESULT(yes)
+		AC_DEFINE([HAVE_RES_CLOSE], 1, [Define to 1 if your system has the close resolver function.]),
 		AC_MSG_RESULT(no)
 	),
 	AC_MSG_RESULT(no)

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=205214&r1=205213&r2=205214
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Wed Jul  8 11:43:12 2009
@@ -784,6 +784,9 @@
 
 /* Define to indicate the ${RESAMPLE_DESCRIP} library version */
 #undef HAVE_RESAMPLE_VERSION
+
+/* Define to 1 if your system has the close resolver function. */
+#undef HAVE_RES_CLOSE
 
 /* Define to 1 if your system has the ndestroy resolver function. */
 #undef HAVE_RES_NDESTROY

Modified: trunk/main/dns.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/dns.c?view=diff&rev=205214&r1=205213&r2=205214
==============================================================================
--- trunk/main/dns.c (original)
+++ trunk/main/dns.c Wed Jul  8 11:43:12 2009
@@ -288,7 +288,7 @@
 	res_nclose(&dnsstate);
 #endif
 #else
-#ifndef __APPLE__
+#ifdef HAVE_RES_CLOSE
 	res_close();
 #endif
 	ast_mutex_unlock(&res_lock);

Modified: trunk/utils/muted.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/utils/muted.c?view=diff&rev=205214&r1=205213&r2=205214
==============================================================================
--- trunk/utils/muted.c (original)
+++ trunk/utils/muted.c Wed Jul  8 11:43:12 2009
@@ -684,7 +684,7 @@
 		fclose(astf);
 		exit(1);
 	}
-#if HAVE_WORKING_FORK
+#ifdef HAVE_WORKING_FORK
 	if (needfork) {
 #ifndef HAVE_SBIN_LAUNCHD
 		if (daemon(0,0) < 0) {




More information about the asterisk-commits mailing list