[syslog-ng]patch for systems without res_init

Balazs Scheidler bazsi@balabit.hu
Sun, 29 Sep 2002 14:00:18 +0200


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);


-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1