[syslog-ng]patch for systems without res_init

Aaron Jackson Aaron.Jackson@dc.gov
Mon, 30 Sep 2002 10:17:08 -0400


It's not that syslog-ng wouldn't compile, it didn't properly link 
because -lresolv wasn't included as one of the linking libraries.  Once 
I added it to the Makefile everything compiled, linked and ran fine.

Aaron

Balazs Scheidler wrote:

>Hi,
>
>for those complaining that syslog-ng 1.5.21 didn't compile because of a
>missing res_init function, apply this patch:
>
>diff -u -r1.55 configure.in
>--- configure.in	27 Sep 2002 09:11:33 -0000	1.55
>+++ configure.in	29 Sep 2002 11:59:12 -0000
>@@ -151,6 +151,7 @@
> AC_FUNC_VPRINTF
> AC_CHECK_LIB(door, door_create)
> AC_CHECK_FUNCS(select snprintf vsnprintf strerror inet_aton strncpy getutent)
>+AC_CHECK_FUNCS(res_init)
> AC_CHECK_FUNC(getopt_long,,[LIBOBJS="getopt.o getopt1.o $LIBOBJS"])
> AC_CHECK_FUNC(strcasecmp,,[LIBOBJS="strcasecmp.o $LIBOBJS"])
> AC_CHECK_FUNC(strptime,,[LIBOBJS="strptime.o $LIBOBJS"])
>diff -u -r1.44 main.c
>--- src/main.c	4 Sep 2002 14:52:25 -0000	1.44
>+++ src/main.c	29 Sep 2002 11:59:12 -0000
>@@ -222,7 +222,9 @@
> 		if (sighuprecvd) {
> 			sighuprecvd = 0;
> 			if (!backend->super.reloading) {
>+#if HAVE_RES_INIT
> 				res_init();
>+#endif
> 				notice("SIGHUP received, restarting syslog-ng\n");
> 				if (!debug_flag) {
> 					set_error_stream(2, 0);
>
>
>  
>