Date: Tue, 10 Nov 1998 09:18:38 -0800 From: Scott Sewall <scott@iprg.nokia.com> To: Rob Deker <deker@digitaladdiction.com> Cc: FreeBSD Stable <freebsd-stable@FreeBSD.ORG> Subject: Re: Questions about in.h and inet.h Message-ID: <3648756E.52BFA1D7@iprg.nokia.com> References: <Pine.BSF.3.96.981110115048.8854F-100000@nyx.digitaladdiction.com>
index | next in thread | previous in thread | raw e-mail
Add #include <sys/types.h> before the other includes.
-- Scott
Rob Deker wrote:
>
> I sent this to freebsd-questions and got nothing back, so I thought I'd
> try here. Apologies to thos seeing this again.
>
> So, I'm trying to compile DaVinci (a big IRC botlike thing) on a
> machine running 3.0-RELEASE and it uses /usr/include/netinet/in.h and
> /usr/include/arpa/inet.h. No big deal right?
>
> Well, gcc seems to think that these header files are broken. To prove that
> I wasn't on crack, I wrote the following stupid little bit of code:
>
> #include <netinet/in.h>
> #include <arpa/inet.h>
>
> main() {}
>
> an tried to compile it. What I got back was:
>
> In file included from foo.c:1:
> /usr/include/netinet/in.h:223: parse error before `u_int32_t'
> /usr/include/netinet/in.h:223: warning: no semicolon at end of struct or
> union
> /usr/include/netinet/in.h:275: parse error before `u_char'
> /usr/include/netinet/in.h:275: warning: no semicolon at end of struct or
> union
> /usr/include/netinet/in.h:276: warning: data definition has no type or
> storage class
> /usr/include/netinet/in.h:277: parse error before `sin_port'
> /usr/include/netinet/in.h:277: warning: data definition has no type or
> storage class
> /usr/include/netinet/in.h:280: parse error before `}'
> /usr/include/netinet/in.h:290: field `ip_dst' has incomplete type
> /usr/include/netinet/in.h:337: field `imr_multiaddr' has incomplete type
> /usr/include/netinet/in.h:338: field `imr_interface' has incomplete type
> In file included from foo.c:2:
> /usr/include/arpa/inet.h:89: warning: parameter has incomplete type
> /usr/include/arpa/inet.h:92: warning: parameter has incomplete type
> /usr/include/arpa/inet.h:96: warning: parameter has incomplete type
> /usr/include/netinet/in.h:278: storage size of `sin_addr' isn't known
>
> I've looked over the header files and don't see anything really wrong with
> them (ObAdmission: I'm no coder). Am I really smoking crack here or is
> something wrong with these header files?
>
> thanks
>
> rob
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-stable" in the body of the message
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3648756E.52BFA1D7>
