From owner-freebsd-questions Sat Jul 3 9:38:31 1999 Delivered-To: freebsd-questions@freebsd.org Received: from cygnus.rush.net (cygnus.rush.net [209.45.245.133]) by hub.freebsd.org (Postfix) with ESMTP id 1C41C14BE4 for ; Sat, 3 Jul 1999 09:38:28 -0700 (PDT) (envelope-from bright@rush.net) Received: from localhost (bright@localhost) by cygnus.rush.net (8.9.3/8.9.3) with SMTP id MAA18057; Sat, 3 Jul 1999 12:43:25 -0400 (EDT) Date: Sat, 3 Jul 1999 11:43:23 -0500 (EST) From: Alfred Perlstein To: Zhibing Wang Cc: freebsd-questions@FreeBSD.ORG Subject: Re: how to compile c program for linux on freebsd In-Reply-To: <19990703162927.27710.rocketmail@web130.yahoomail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 3 Jul 1999, Zhibing Wang wrote: > hi there: > I am trying to compile a c program on freebsd 3.2. > the program was writen for linux originally. it calls > many header files in /usr/include/linux and some other > directories, which can not be found in freebsd. > what can I do? just copy those directories from > linux ? > really appreciate for any help. no: 1) remove all includes that reference linux/* 2) try to compile the program, see which structures the compile fails on because they are not defined, 3) try to find those in the freebsd headers and include those 4) repeat steps 2 & 3 until you have found all structures needed. 5) convert still unfound structures to the appropriate freebsd ones. do not touch anything in /usr/include, you should only be working on your program. -Alfred Perlstein - [bright@rush.net|bright@wintelcom.net] systems administrator and programmer Win Telecom - http://www.wintelcom.net/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message