From owner-freebsd-questions Wed Mar 5 7:58:10 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C79DF37B401 for ; Wed, 5 Mar 2003 07:58:08 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2C6A43FCB for ; Wed, 5 Mar 2003 07:58:07 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.7/8.12.7) id h25Fw1XZ020367; Wed, 5 Mar 2003 09:58:01 -0600 (CST) (envelope-from dan) Date: Wed, 5 Mar 2003 09:58:01 -0600 From: Dan Nelson To: Martin Nilsson Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Calling a Linux library from FreeBSD Message-ID: <20030305155801.GD21653@dan.emsphone.com> References: <3E66037C.8060209@filex.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E66037C.8060209@filex.se> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.3i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Mar 05), Martin Nilsson said: > Is it possible to open and call functions in a static Linux library > (.so) from a native FreeBSD program? Important things like struct stat and off_t are different sizes, so even if you can link with them, all except the most basic program will seg fault. XFree86 modules are an exception since they went to great pains to develop their own ABI that was portable across OSes. That's a shared library, btw. Static libraries end in ".a" . > Why am I trying this? I got a couple of cheap Cryptoswift SSL > accelerators off ebay and they only come with Linux drivers. The > kernel driver seems simple enough to port but openssl communicates > with the card thru a precompiled library that that I don't have the > source for. You may have to install the linux-devel port, and build anything that requires that library under Linux emulation. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message