From owner-freebsd-hackers Thu Jan 7 21:32:22 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA05518 for freebsd-hackers-outgoing; Thu, 7 Jan 1999 21:32:22 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA05510 for ; Thu, 7 Jan 1999 21:32:19 -0800 (PST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.1/8.9.1) id QAA25748; Fri, 8 Jan 1999 16:33:52 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199901080533.QAA25748@cimlogic.com.au> Subject: Re: Strange warnings when compiling Berkeley DB on FreeBSD 3.0 In-Reply-To: <199901080447.XAA23708@abyssinian.sleepycat.com> from Sleepycat Software at "Jan 7, 1999 11:47:48 pm" To: db@abyssinian.sleepycat.com (Sleepycat Software) Date: Fri, 8 Jan 1999 16:33:52 +1100 (EST) Cc: yusufg@huge.net, freebsd-hackers@FreeBSD.ORG, openldap-devel@openldap.org X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message