Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Sep 1998 00:07:06 +0000
From:      Mike Smith <mike@smith.net.au>
To:        Roland Jesse <jesse@prinz-atm.CS.Uni-Magdeburg.De>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: gcc fails to compile jesred-1.2 
Message-ID:  <199809030007.AAA00939@word.smith.net.au>
In-Reply-To: Your message of "Thu, 03 Sep 1998 07:47:20 %2B0200." <19980903074720.B26829@cs.uni-magdeburg.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Hello,
> 
> I posted the question to the questions list but to no avail.
> 
> When trying to compile
> http://ivs.cs.uni-magdeburg.de/~elkner/webtools/src/jesred-1.2.tar.gz, gcc
> fails with the following messages:
> 
> j.wh4-422 ~/jesred-1.2 % make
> cc -O3 -s -I.   -c ip_list.c
> In file included from ip_list.c:99:
> /usr/include/netinet/in.h:212: parse error before `u_long'
> /usr/include/netinet/in.h:212: warning: no semicolon at end of struct or
> union
> /usr/include/netinet/in.h:263: parse error before `u_char'
> /usr/include/netinet/in.h:263: warning: no semicolon at end of struct or
> union
> [...]
> 
> Honestly - I do not know why the compiler fails here. The source code
> seems to be ok and the include does, too. 

The compiler's not failing - it's working properly.  What it's telling 
you is that the code is bogus.

> I would very much appreciate it if somebody else could try to build this
> small package and would provide a hint or two of what I am missing here.

You need <sys/types.h> and probably <sys/socket.h> before you can 
include <netinet/in.h>.

You'll also want to include <stdlib.h>, because they use NULL.

And take -O3 out of the Makefile, at least to start with.  -O is about 
all that's reliable.

The fact that it's supposed to build at all makes me wonder what 
platform it was developed on.  The Makefile discourages the immediate 
"Linux" response, but I still need a barf bag.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809030007.AAA00939>