diff mbox series

[v2,7/16] linux-gen: pktio: ethtool: don't include linux/if.h

Message ID 1502791206-2437-8-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v2,1/16] configure: move configure header to top of build tree | expand

Commit Message

Github ODP bot Aug. 15, 2017, 9:59 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


net/if.h together with _USE_MISC (from _GNU_SOURCE) includes necessary
definitions, so no point in including platform-specific linux/if.h.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 127 (lumag:improve-build)
 ** https://github.com/Linaro/odp/pull/127
 ** Patch: https://github.com/Linaro/odp/pull/127.patch
 ** Base sha: 90d4ce1b3b25ca18446131906007571cc0ed0191
 ** Merge commit sha: 3e7a44d8f4b7c90183d3bd3b57bc812f16de030f
 **/
 platform/linux-generic/pktio/ethtool.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/pktio/ethtool.c b/platform/linux-generic/pktio/ethtool.c
index 2f796745..72b8d759 100644
--- a/platform/linux-generic/pktio/ethtool.c
+++ b/platform/linux-generic/pktio/ethtool.c
@@ -8,10 +8,12 @@ 
 #include "config.h"
 #endif
 
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
 #include <sys/ioctl.h>
 #include <netinet/in.h>
 #include <linux/sockios.h>
-#include <linux/if.h>
 #include <linux/ethtool.h>
 #include <errno.h>
 #include <net/if.h>