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>
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/addr.h>
-#include <linux/if.h>
#ifdef __cplusplus
extern "C" {
* Copyright (c) 2003-2010 Thomas Graf <tgraf@suug.ch>
*/
+#include <linux/if.h>
#include <netlink/cli/utils.h>
#include <netlink/cli/link.h>