From: Ben Pfaff <blp@nicira.com> Date: Wed, 26 May 2010 17:05:19 +0000 (-0700) Subject: Always #include <sys/socket.h> before <net/if.h>. X-Git-Tag: v1.0.1~23 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9d82ec478d52edfddd215dff1b0659ed7508b365;p=sliver-openvswitch.git Always #include <sys/socket.h> before <net/if.h>. FreeBSD 8.0's <net/if.h> requires <sys/socket.h> to be included first, even though I don't see any such requirement in POSIX. --- diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 2f4463e6d..c4cc6e983 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -23,6 +23,7 @@ #include <fcntl.h> #include <inttypes.h> #include <netinet/in.h> +#include <sys/socket.h> #include <net/if.h> #include <stdlib.h> #include <string.h> diff --git a/ofproto/discovery.c b/ofproto/discovery.c index 2044ea5e4..b875890af 100644 --- a/ofproto/discovery.c +++ b/ofproto/discovery.c @@ -18,6 +18,7 @@ #include "discovery.h" #include <errno.h> #include <inttypes.h> +#include <sys/socket.h> #include <net/if.h> #include <regex.h> #include <stdlib.h> diff --git a/ofproto/in-band.c b/ofproto/in-band.c index e52a0a056..884cf1d26 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -19,6 +19,7 @@ #include <arpa/inet.h> #include <errno.h> #include <inttypes.h> +#include <sys/socket.h> #include <net/if.h> #include <string.h> #include <stdlib.h> diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 101094835..069d5e518 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -19,6 +19,7 @@ #include "ofproto.h" #include <errno.h> #include <inttypes.h> +#include <sys/socket.h> #include <net/if.h> #include <netinet/in.h> #include <stdbool.h> diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index ecfb3069a..df76e86e8 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -19,6 +19,7 @@ #include <errno.h> #include <getopt.h> #include <inttypes.h> +#include <sys/socket.h> #include <net/if.h> #include <netinet/in.h> #include <signal.h> diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 1a0c9363e..96d64b3bb 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -19,6 +19,7 @@ #include <errno.h> #include <getopt.h> #include <inttypes.h> +#include <sys/socket.h> #include <net/if.h> #include <netinet/in.h> #include <signal.h> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 04898f88d..8314c5392 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -20,6 +20,7 @@ #include <arpa/inet.h> #include <ctype.h> #include <inttypes.h> +#include <sys/socket.h> #include <net/if.h> #include <openflow/openflow.h> #include <signal.h>