Re: solaris libpq threaded build fails - Mailing list pgsql-hackers

From Andrew Chernow
Subject Re: solaris libpq threaded build fails
Date
Msg-id 496D657E.4070707@esilo.com
Whole thread Raw
In response to Re: solaris libpq threaded build fails  (Bruce Momjian <bruce@momjian.us>)
Responses Re: solaris libpq threaded build fails  (Peter Eisentraut <peter_e@gmx.net>)
Re: solaris libpq threaded build fails  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
>>>
>> Forgot to mention, there is an easy fix:
>>
>> ~]# LDFLAGS="-lnsl" ./configure --enable-thread-safety
> 
> But I assume that only works if I use gethostbyname_r(), right?  

No, works for gethostbyname as well.  They are all in libnsl.

> But we do check for that in thread_test.c.  

The problem with the current check is its only an AC_CHECK_FUNCS.  We need an 
AC_SEARCH_LIBS first so the proper -llibrary is appended to LIBS, which is used 
by AC_CHECK_FUNCS.

AC_SEARCH_LIBS(gethostbyname_r, c nsl)
AC_CHECK_FUNCS([strerror_r getpwuid_r gethostbyname_r])

(AC_CHECK_FUNCS from configure.in line 1371)

> So that library that is all that is
> needed?
> 

It worked for me.

-- 
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: A single escape required for log_filename
Next
From: "Koichi Suzuki"
Date:
Subject: Re: Documenting pglesslog