Date: Fri, 28 Nov 2003 14:55:51 +0000 From: Dofri Jonsson <imp@hell.is> To: freebsd-questions@freebsd.org Subject: Re: compiler errors on freebsd; compiles fine on linux Message-ID: <20031128145551.47066c11.imp@hell.is> In-Reply-To: <3FC75380.3070706@cfl.rr.com> References: <3FC75380.3070706@cfl.rr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Nov 2003 08:54:08 -0500
Aaron Walker <ka0ttic@cfl.rr.com> 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 <netinet/in.h>
> #include <sys/types.h>
> #include "lwhttpd.h"
> #include "server.h"
>
man 3 inet
...
SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
...
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031128145551.47066c11.imp>
