🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1565

Re: Problem with header <netinet/in.h>

#1565
From: Daryll J. Strauss
Date: Fri, 16 Oct 1992 19:33
25 lines
1684 bytes
In article <1bmqp8INN20s@uwm.edu> xepo@csd4.csd.uwm.edu (Scott R Violet) writes:
>
>Hi,
>	Last night I was playing around with sockets and needed the
>in_addr structure that is defined in the file <netinet/in.h>, of
>course now it is in the direcotry /NextDeveloper/headers/bsd.  But
>anyway, when I included this file I got errors in the header file upon
>compilation.  The errors were on line 116,117,118, and 179 (I don't
>have them handy, but I am pretty sure that the numbers are correct,)
>and the errors were u_char, u_short, and u_long undefined...  How
>would such an error come up?  The only remedy I could come up with was
>to edit the in.h header file and stick in the line 
>#import <sys/types.h>
>	Why should I have had to do that?  Am I missing something, or
>is it another bug?

No, it quite common to need multiple header files in order to make a
particular function work, and sys/types.h is a real common one to
require. For example, if you look at the man page for socket you'll see
that it says:
	#include <sys/types.h>
	#include <sys/socket.h>

You shouldn't be modifying the headers, you should just be including
both sys/types.h and in/in.h.
Technical Details
Message-ID: <1bn5dkINNpah@news.aero.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!news.aero.org!strauss
References: <1bmqp8INN20s@uwm.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!elroy.jpl.nasa.gov!news.aero.org!strauss
From: strauss@aero.org (Daryll J. Strauss)
Newsgroups: comp.sys.next.programmer
Subject: Re: Problem with header <netinet/in.h>
Message-ID: <1bn5dkINNpah@news.aero.org>
Date: 16 Oct 92 19:33:08 GMT
Article-I.D.: news.1bn5dkINNpah
References: <1bmqp8INN20s@uwm.edu>
Distribution: usa
Organization: The Aerospace Corporation
Lines: 25
NNTP-Posting-Host: altair.aero.org