Timur Davydov has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/41941?usp=email )


Change subject: core: guard Linux netlink headers by libmnl usage
......................................................................

core: guard Linux netlink headers by libmnl usage

Only include Linux-specific netlink headers when the libmnl backend
is enabled.

The code paths requiring <linux/if_link.h> and <linux/rtnetlink.h>
are entirely guarded by ENABLE_LIBMNL conditionals, so the headers should
not be included unconditionally.

This avoids pulling in Linux-only headers when the corresponding
backend is not built.

Change-Id: I0b681deb1f1e025e3ea9996f19b1de06a5feb408
---
M src/core/netdev.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/41/41941/1

diff --git a/src/core/netdev.c b/src/core/netdev.c
index 1e886f9..22e1e00 100644
--- a/src/core/netdev.c
+++ b/src/core/netdev.c
@@ -82,6 +82,8 @@
 #include <net/if.h>
 #include <net/route.h>

+#ifdef ENABLE_LIBMNL
+
 #if defined(__linux__)
 #include <linux/if_link.h>
 #include <linux/rtnetlink.h>
@@ -89,6 +91,8 @@
 #error "Unknown platform!"
 #endif

+#endif /* if ENABLE_LIBMNL */
+
 #include <osmocom/core/utils.h>
 #include <osmocom/core/select.h>
 #include <osmocom/core/linuxlist.h>

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41941?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0b681deb1f1e025e3ea9996f19b1de06a5feb408
Gerrit-Change-Number: 41941
Gerrit-PatchSet: 1
Gerrit-Owner: Timur Davydov <[email protected]>

Reply via email to