svn commit: r226610 - in head/sys: net netinet
Ed Schouten
ed at FreeBSD.org
Fri Oct 21 12:58:34 UTC 2011
Author: ed
Date: Fri Oct 21 12:58:34 2011
New Revision: 226610
URL: http://svn.freebsd.org/changeset/base/226610
Log:
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
Modified:
head/sys/net/if.h
head/sys/netinet/tcp.h
Modified: head/sys/net/if.h
==============================================================================
--- head/sys/net/if.h Fri Oct 21 11:11:18 2011 (r226609)
+++ head/sys/net/if.h Fri Oct 21 12:58:34 2011 (r226610)
@@ -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: head/sys/netinet/tcp.h
==============================================================================
--- head/sys/netinet/tcp.h Fri Oct 21 11:11:18 2011 (r226609)
+++ head/sys/netinet/tcp.h Fri Oct 21 12:58:34 2011 (r226610)
@@ -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-all
mailing list