Don't we also need to now start linking against lresolv?? ..../dev/httpd-git-trunk/srclib/apr-util/libaprutil-1.la -lexpat -liconv /Users/jim/src/asf/code/dev/httpd-git-trunk/srclib/apr/libapr-1.la -lpthread Undefined symbols: "_res_9_init", referenced from: _main in libmain.a(main.o) ld: symbol(s) not found collect2: ld returned 1 exit status make[1]: *** [httpd] Error 1 make: *** [install-recursive] Error 1
after this patch, build now breaks (at least os OS X). On Feb 3, 2011, at 3:20 PM, s...@apache.org wrote: > Author: sf > Date: Thu Feb 3 20:20:02 2011 > New Revision: 1066944 > > URL: http://svn.apache.org/viewvc?rev=1066944&view=rev > Log: > Reload resolv.conf on graceful restarts > > PR: 50619 > Submitted by: Matt Miller <m miller f5 com>, Stefan Fritsch > > Modified: > httpd/httpd/trunk/CHANGES > httpd/httpd/trunk/configure.in > httpd/httpd/trunk/server/main.c > > Modified: httpd/httpd/trunk/CHANGES > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1066944&r1=1066943&r2=1066944&view=diff > ============================================================================== > --- httpd/httpd/trunk/CHANGES [utf-8] (original) > +++ httpd/httpd/trunk/CHANGES [utf-8] Thu Feb 3 20:20:02 2011 > @@ -2,6 +2,9 @@ > > Changes with Apache 2.3.11 > > + *) core: Reload resolv.conf on graceful restarts. PR 50619. > + [Matt Miller <m miller f5 com>, Stefan Fritsch] > + > *) mod_mime: Ignore leading dots when looking for mime extensions. > PR 50434 [Stefan Fritsch] > > > Modified: httpd/httpd/trunk/configure.in > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/configure.in?rev=1066944&r1=1066943&r2=1066944&view=diff > ============================================================================== > --- httpd/httpd/trunk/configure.in (original) > +++ httpd/httpd/trunk/configure.in Thu Feb 3 20:20:02 2011 > @@ -400,6 +400,7 @@ sys/sem.h \ > sys/sdt.h > ) > AC_HEADER_SYS_WAIT > +AC_HEADER_RESOLV > > dnl ## Check for typedefs, structures, and compiler characteristics. > > @@ -416,6 +417,7 @@ LIBS="$saved_LIBS" > > dnl See Comment #Spoon > > +AC_SEARCH_LIBS(res_init, resolv, , [AC_SEARCH_LIBS(__res_init,resolv)]) > AC_CHECK_FUNCS( \ > getpwnam \ > getgrnam \ > @@ -424,7 +426,9 @@ bindprocessor \ > prctl \ > timegm \ > getpgid \ > -fopen64 > +fopen64 \ > +res_init \ > +__res_init > ) > > dnl confirm that a void pointer is large enough to store a long integer > > Modified: httpd/httpd/trunk/server/main.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/server/main.c?rev=1066944&r1=1066943&r2=1066944&view=diff > ============================================================================== > --- httpd/httpd/trunk/server/main.c (original) > +++ httpd/httpd/trunk/server/main.c Thu Feb 3 20:20:02 2011 > @@ -44,6 +44,16 @@ > #include <unistd.h> > #endif > > +#if HAVE_NETINET_IN_H > +#include <netinet/in.h> > +#endif > +#if HAVE_ARPA_NAMESER_H > +#include <arpa/nameser.h> > +#endif > +#if HAVE_RESOLV_H > +#include <resolv.h> > +#endif > + > /* WARNING: Win32 binds http_main.c dynamically to the server. Please place > * extern functions and global data in another appropriate module. > * > @@ -679,6 +689,17 @@ int main(int argc, const char * const ar > apr_pool_clear(pconf); > ap_clear_auth_internal(); > > +/* glibc has __res_init that is #defined to res_init */ > +#if HAVE_RES_INIT || HAVE___RES_INIT > + /* > + * resolv.conf may have changed, so this will read/reread it. > + */ > + if (res_init() == -1) { > + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL, > + "Resolver initialization failed."); > + } > +#endif > + > for (mod = ap_prelinked_modules; *mod != NULL; mod++) { > ap_register_hooks(*mod, pconf); > } > >