net: fix header include order for FreeBSD
authorDavid Marchand <david.marchand@redhat.com>
Thu, 6 May 2021 14:25:19 +0000 (16:25 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 11 May 2021 13:44:38 +0000 (15:44 +0200)
Spotted by sparse in OVS build:

../../lib/netdev-dpdk.c: note: in included file (through
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_ip.h,
/home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h, ...):
../../include/sparse/arpa/inet.h:22:2: error: "Must include
<netinet/in.h> before <arpa/inet.h> for FreeBSD support"

This is a check enforced by OVS itself.
See [1] for some context.

1: https://github.com/openvswitch/ovs/commit/b2befd5bb2db

Fixes: 89813a522e68 ("net: provide IP-related API on any OS")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/net/rte_ip.h

index 8c18900..4b72896 100644 (file)
@@ -22,8 +22,8 @@
 #else
 #include <sys/socket.h>
 #include <sys/types.h>
-#include <arpa/inet.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <netinet/ip.h>
 #endif