[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Strange warnings when compiling Berkeley DB on FreeBSD 3.0

Sleepycat Software wrote:
> > cc -c -O -I. -I../dist/../include -D_THREAD_SAFE ../dist/../clib/getlong.c
> > cc -o db_dump185  db_dump185.o err.o getlong.o -lc_r
> > /usr/lib/libc.so: warning: this program uses gets(), which is unsafe.
> This is not a Berkeley DB error.  Berkeley DB does not use gets().

Not commenting on the gets() warning, but the link line above links
db_dump185 against libc_r _and_ libc which is most certainly not what is
intended. If the application is threaded, pass `-pthread' to gcc and
it will link against libc_r /instead/ of libc.

John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137