]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Improve support on Linux for res_init
authoramosjeffries <>
Thu, 20 Sep 2007 17:07:53 +0000 (17:07 +0000)
committeramosjeffries <>
Thu, 20 Sep 2007 17:07:53 +0000 (17:07 +0000)
res_init() is just a macro re-define of __res_init on Linux (Debian/Ubuntu)
This patch adds a check for the underlying structure and uses it if needed

configure.in
include/config.h

index 239f7c2a9bb21da92812b64fc6a80b3563fe5e1c..43e7c7bea79c411d06b99e99d9cb85ef4418978b 100644 (file)
@@ -1,7 +1,7 @@
 
 dnl  Configuration input file for Squid
 dnl
-dnl  $Id: configure.in,v 1.479 2007/09/20 11:03:42 amosjeffries Exp $
+dnl  $Id: configure.in,v 1.480 2007/09/20 11:07:53 amosjeffries Exp $
 dnl
 dnl
 dnl
@@ -11,7 +11,7 @@ AM_CONFIG_HEADER(include/autoconf.h)
 AC_CONFIG_AUX_DIR(cfgaux)
 AC_CONFIG_SRCDIR([src/main.cc])
 AM_INIT_AUTOMAKE([tar-ustar])
-AC_REVISION($Revision: 1.479 $)dnl
+AC_REVISION($Revision: 1.480 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -2522,6 +2522,7 @@ AC_CHECK_FUNCS(\
        regexec \
        regfree \
        res_init \
+       __res_init \
        rint \
        sbrk \
        select \
index d1ab6215ca08700cb560fb0fc173303f05901d33..c4683203103aca25cf59ebc2601605ab4ba10fbf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h,v 1.24 2007/09/20 10:59:30 amosjeffries Exp $
+ * $Id: config.h,v 1.25 2007/09/20 11:07:53 amosjeffries Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -344,6 +344,14 @@ typedef union {
 #undef HAVE_MALLOC_H
 #endif
 
+/*
+ * res_init() is just a macro re-definition of __res_init on Linux (Debian/Ubuntu)
+ */
+#if !defined(HAVE_RES_INIT) && defined(HAVE___RES_INIT) && !defined(res_init)
+#define res_init  __res_init
+#define HAVE_RES_INIT  HAVE___RES_INIT
+#endif
+
 #if !defined(CACHEMGR_HOSTNAME)
 #define CACHEMGR_HOSTNAME ""
 #else