summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Chappelle <dchappelle@topologyinc.com>2019-04-30 19:32:30 +0530
committerNishant Chaprana <n.chaprana@samsung.com>2019-04-30 19:32:30 +0530
commitbec3ed0cd8df9ae71e968f8135b1754a8913aad4 (patch)
tree24c1c35613fc7ab19e54f0dff83aca2e620792d3
parent2d3b500003fddf412f28061b42e99157579583e1 (diff)
downloadlibnl3-bec3ed0cd8df9ae71e968f8135b1754a8913aad4.tar.gz
libnl3-bec3ed0cd8df9ae71e968f8135b1754a8913aad4.tar.bz2
libnl3-bec3ed0cd8df9ae71e968f8135b1754a8913aad4.zip
route: remove unnecessary include of private linux/if.hsubmit/tizen/20190502.123334accepted/tizen/unified/20190503.040749
Including linux/if.h in netlink/route/link.h causes issues in cases where libnl is used in conjuntion with other third party libraries that include net/if.h. Seems to be a long checkered history of symbol collisions between these two files. As it turns out, including linux/if.h from within netlink/route/link.h is actually unecessary. I resurrected a forgotten path from this thread: http://lists.infradead.org/pipermail/libnl/2012-April/000525.html By removing the include as the patch suggests we can get around the nuissance of the symbol collisions. https://github.com/thom311/libnl/pull/73 Note: This patch is backported from http://git.infradead.org/users/tgr/libnl.git/patch/50a76998ac36ace3716d3c979b352fac73cfc80a Change-Id: I6651c84e55870963825180c2732de581e6bb0ab6 Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
-rw-r--r--include/netlink/route/link.h1
-rw-r--r--src/nl-link-set.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/include/netlink/route/link.h b/include/netlink/route/link.h
index 321a80d..ef863f9 100644
--- a/include/netlink/route/link.h
+++ b/include/netlink/route/link.h
@@ -15,7 +15,6 @@
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/addr.h>
-#include <linux/if.h>
#ifdef __cplusplus
extern "C" {
diff --git a/src/nl-link-set.c b/src/nl-link-set.c
index 3178a98..42d5fa1 100644
--- a/src/nl-link-set.c
+++ b/src/nl-link-set.c
@@ -9,6 +9,7 @@
* Copyright (c) 2003-2010 Thomas Graf <tgraf@suug.ch>
*/
+#include <linux/if.h>
#include <netlink/cli/utils.h>
#include <netlink/cli/link.h>