From owner-freebsd-hackers@FreeBSD.ORG Sat May 1 06:29:49 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADA3D16A4CE for ; Sat, 1 May 2004 06:29:49 -0700 (PDT) Received: from orange.csi.cam.ac.uk (orange.csi.cam.ac.uk [131.111.8.77]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F2D543D60 for ; Sat, 1 May 2004 06:29:49 -0700 (PDT) (envelope-from rtb27@cam.ac.uk) Received: from localhost ([127.0.0.1] helo=rtb27.robinson.cam.ac.uk) by orange.csi.cam.ac.uk with esmtp (Exim 4.12) id 1BJuYu-0004uw-00 for freebsd-hackers@freebsd.org; Sat, 01 May 2004 14:29:48 +0100 From: Richard Bradley To: freebsd-hackers@freebsd.org Date: Sat, 1 May 2004 14:28:19 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200405011428.19287.rtb27@cam.ac.uk> Subject: linking questions (how to use linux version of libc) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2004 13:29:49 -0000 Hi, I am trying to compile a program that uses "initstate_r" from random(3) in libc. However this function only seems to exist in the linux version of libc. Compare `man 3 random` on a linux box [1] which has "initstate_r" and "initstate", whereas `man 3 random` on a FreeBSD box [2] has only "initstate". I have the linux compat stuff on my system. The header called in the file is "#include " When I try to compile, it comes up with "undeclared identifier" errors. What can I do? Any help is much appreciated. Rich [1] -- man 3 random on linux -- http://h30097.www3.hp.com/docs/base_doc/ DOCUMENTATION/V51B_HTML/MAN/MAN3/2370____.HTM [2] -- man 3 random on FreeBSD -- http://www.FreeBSD.org/cgi/ man.cgi?query=random&apropos=0&sektion=0&manpath=FreeBSD+5.2-RELEASE+and +Ports&format=html