Subject: Re: #include problem
To: None <port-sparc@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sparc
Date: 12/29/2001 18:00:57
On Sat, Dec 29, 2001 at 07:25:58 -0700, Herb Peyerl wrote:

> "Jan Senolt" <senolt@sps-jia.cz>  wrote:
>  > I have problem with include any headers files (e.g. =
>  > /usr/include/sys/socket.h) to my C program:
>  > When I try compile this "program":
>  > 
>  > #include <sys/socket.h>
>  > void main(){
>  > }
>  > 
>  > I've got those errors:
>  > 
>  > In file included from test.c:1:
>  > /usr/include/sys/socket.h:186: syntax error before `u_char'
>  > /usr/include/sys/socket.h:214: syntax error before `u_char'
> 
> You have to include <sys/types.h>
> 
> 'grep' is your friend.

Our socket(2) says 

     #include <sys/socket.h>

     int
     socket(int domain, int type, int protocol);

I checked Solaris and FreeBSD and they both say: 

     #include <sys/types.h>
     #include <sys/socket.h>

We should update our man page, perhaps?

SY, Uwe
-- 
uwe@ptc.spbu.ru                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen