From nobody@FreeBSD.org  Thu Feb 15 14:28:36 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 9074837B491
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Feb 2001 14:28:35 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f1FMSZA87464;
	Thu, 15 Feb 2001 14:28:35 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200102152228.f1FMSZA87464@freefall.freebsd.org>
Date: Thu, 15 Feb 2001 14:28:35 -0800 (PST)
From: sapsan11@mail.ru
To: freebsd-gnats-submit@FreeBSD.org
Subject: sys/socket.h and netinet/in.h contain errors
X-Send-Pr-Version: www-1.0

>Number:         25121
>Category:       misc
>Synopsis:       sys/socket.h and netinet/in.h contain errors
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 15 14:30:01 PST 2001
>Closed-Date:    Thu Feb 15 15:04:31 PST 2001
>Last-Modified:  Thu Feb 15 15:05:47 PST 2001
>Originator:     Alex
>Release:        4.2 Stable
>Organization:
>Environment:
FreeBSD sapsan 4.2-STABLE FreeBSD 4.2-STABLE #0: Mon Jan 22 00:17:19 EET 2001     root@sapsan:/usr/src/sys/compile/SAPSAN  i386
>Description:
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
>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: roam 
State-Changed-When: Thu Feb 15 15:04:31 PST 2001 
State-Changed-Why:  
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. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25121 
>Unformatted:
