Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Feb 2012 18:48:40 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r230953 - in stable/9/sys: net netinet
Message-ID:  <201202031848.q13ImeTU099556@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202031848.q13ImeTU099556>