svn commit: r230953 - in stable/9/sys: net netinet

Ed Schouten ed at FreeBSD.org
Fri Feb 3 18:48:40 UTC 2012


Author: ed
Date: Fri Feb  3 18:48:40 2012
New Revision: 230953
URL: http://svn.freebsd.org/changeset/base/230953

Log:
  MFC r226610:
  
    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).

Modified:
  stable/9/sys/net/if.h
  stable/9/sys/netinet/tcp.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/net/if.h
==============================================================================
--- stable/9/sys/net/if.h	Fri Feb  3 17:50:39 2012	(r230952)
+++ stable/9/sys/net/if.h	Fri Feb  3 18:48:40 2012	(r230953)
@@ -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;

Modified: stable/9/sys/netinet/tcp.h
==============================================================================
--- stable/9/sys/netinet/tcp.h	Fri Feb  3 17:50:39 2012	(r230952)
+++ stable/9/sys/netinet/tcp.h	Fri Feb  3 18:48:40 2012	(r230953)
@@ -34,6 +34,7 @@
 #define _NETINET_TCP_H_
 
 #include <sys/cdefs.h>
+#include <sys/types.h>
 
 #if __BSD_VISIBLE
 


More information about the svn-src-stable mailing list