Add missing #includes.

According to POSIX, these two header files should be able to be included
by themselves, not depending on other headers. The <net/if.h> header
uses struct sockaddr when __BSD_VISIBLE=1, while <netinet/tcp.h> uses
integer datatypes (u_int32_t, u_short, etc).

MFC after:	2 months
This commit is contained in:
Ed Schouten 2011-10-21 12:58:34 +00:00
parent b6b8562bfc
commit cf05e311ea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226610
2 changed files with 3 additions and 0 deletions

View File

@ -43,9 +43,11 @@
/*
* <net/if.h> does not depend on <sys/time.h> on most other systems. This
* helps userland compatibility. (struct timeval ifi_lastchange)
* The same holds for <sys/socket.h>. (struct sockaddr ifru_addr)
*/
#ifndef _KERNEL
#include <sys/time.h>
#include <sys/socket.h>
#endif
struct ifnet;

View File

@ -34,6 +34,7 @@
#define _NETINET_TCP_H_
#include <sys/cdefs.h>
#include <sys/types.h>
#if __BSD_VISIBLE