[syslog-ng]crashbug fix in recent syslog-ng versions

Borzenkov Andrey Andrej.Borsenkow@mow.siemens.ru
Wed, 30 Oct 2002 16:56:43 +0300


> Well with a couple of changes I got it to work correctly on Solaris 8
x86.
> I ran configure a bunch of times with various corrections to
configure.in
> because I originally got the HAVE_RES_INIT problem like the others
did.
> Then of course the link problem with -lresolv came up during the
compile.
> But I used the patch that Andrey sent for acconfig.h then I added a
line
> to
> configure.in and voila! it worked perfectly for me "out of the box" so
to
> speak.
> 
> *** configure.in.orig   Tue Oct 29 20:00:52 2002
> --- configure.in        Tue Oct 29 20:20:34 2002
> ***************
> *** 151,156 ****
> --- 151,157 ----
> 
>   if test "x$blb_cv_c_res_init" = "xyes"; then
>         AC_DEFINE(HAVE_RES_INIT)
> +       LIBS="$LIBS -lresolv"
>   fi
> 
>   dnl Checks for library functions.
> 

This patch is obviously wrong. You cannot assume that libresolv exists
just because res_init is found in some header. What is the right thing
to do is to search for library that contains res_init.

-andrey