Bug 25121

Summary: sys/socket.h and netinet/in.h contain errors
Product: Base System Reporter: sapsan11 <sapsan11>
Component: miscAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description sapsan11 2001-02-15 22:30:01 UTC
This program returns a lot of syntax errors in including files when I compile it...

#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>

void main(){
  printf("Hello!");
}

Compile with:
$ cc -o test test.C

How-To-Repeat: Include these files into your program and try to compile
Comment 1 Peter Pentchev freebsd_committer freebsd_triage 2001-02-15 23:04:31 UTC
State Changed
From-To: open->closed

All the manpages for functions in <sys/socket.h> and <netinet/in.h> 
indicate, in the SYNOPSIS section, that you alse need to include 
<sys/types.h>.  Your program, just as everybody else's, compiles 
just fine when you add all the needed - and documented - includes.