From owner-freebsd-questions@FreeBSD.ORG Fri Nov 28 06:56:44 2003 Return-Path: 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 AE06316A4CE for ; Fri, 28 Nov 2003 06:56:44 -0800 (PST) Received: from copper.plainold.net (copper.plainold.net [213.167.142.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06AA243FBD for ; Fri, 28 Nov 2003 06:56:43 -0800 (PST) (envelope-from imp@hell.is) X-AuthUser: imp@hell.is Received: from hades.tern.is (213.167.142.180) by copper.plainold.net with [XMail 1.11 (Linux/Ix86) ESMTP Server] id for from ; Fri, 28 Nov 2003 14:47:22 -0000 Date: Fri, 28 Nov 2003 14:55:51 +0000 From: Dofri Jonsson To: freebsd-questions@freebsd.org Message-Id: <20031128145551.47066c11.imp@hell.is> In-Reply-To: <3FC75380.3070706@cfl.rr.com> References: <3FC75380.3070706@cfl.rr.com> X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i386-portbld-freebsd4.8) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: compiler errors on freebsd; compiles fine on linux X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2003 14:56:44 -0000 X-List-Received-Date: Fri, 28 Nov 2003 14:56:44 -0000 On Fri, 28 Nov 2003 08:54:08 -0500 Aaron Walker wrote: > I am attempting to write a http server (mainly just to learn), and I > installed FreeBSD on my other box (I have Gentoo linux on my main box) > to test the code to make sure its compatible with both BSD and Linux. > The code compiles fine on linux, but I am getting weird compiler errors > under FBSD. > > > all my source files compile fine except main.c: > > #include > #include > #include "lwhttpd.h" > #include "server.h" > man 3 inet ... SYNOPSIS #include #include #include #include ... The includes must be in that order. sys/types.h and sys/socket.h define the types that are used in netint/in.h . It will work on Linux as well, to my experience at least. Dofri