From owner-freebsd-questions@FreeBSD.ORG Fri Nov 28 12:54:49 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 B68BF16A4CE for ; Fri, 28 Nov 2003 12:54:49 -0800 (PST) Received: from obsecurity.dyndns.org (adsl-63-207-60-234.dsl.lsan03.pacbell.net [63.207.60.234]) by mx1.FreeBSD.org (Postfix) with ESMTP id D4B1F43FA3 for ; Fri, 28 Nov 2003 12:54:48 -0800 (PST) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 7F63366C8E; Fri, 28 Nov 2003 12:54:48 -0800 (PST) Date: Fri, 28 Nov 2003 12:54:48 -0800 From: Kris Kennaway To: Aaron Walker Message-ID: <20031128205448.GA86708@xor.obsecurity.org> References: <3FC75380.3070706@cfl.rr.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <3FC75380.3070706@cfl.rr.com> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org 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 20:54:49 -0000 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 28, 2003 at 08:54:08AM -0500, Aaron Walker wrote: > I am attempting to write a http server (mainly just to learn), and I=20 > installed FreeBSD on my other box (I have Gentoo linux on my main box)=20 > to test the code to make sure its compatible with both BSD and Linux.=20 > The code compiles fine on linux, but I am getting weird compiler errors= =20 > under FBSD. Linux "cheats" by making certain system headers include other headers, in a way that is not specified by POSIX. Therefore, you can get away with code like yours on Linux that will fail on other POSIX-compliant systems like FreeBSD. Another poster has already told you which headers you're missing. Kris --KsGdsel6WgEHnImy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/x7YYWry0BWjoQKURArhLAJ4nC7YgQNGpRLwuhhyXi4Q0TDXOCQCfabRQ M2KYGLVO7Psr8Pdw7Jco7VE= =1oKT -----END PGP SIGNATURE----- --KsGdsel6WgEHnImy--