Attention is currently required from: Timur Davydov.
Timur Davydov uploaded patch set #6 to this change.
The following approvals got outdated and were removed: Verified-1 by Jenkins Builder
build: detect netns support via configure-time capability checks
The netns API was previously guarded by platform-specific preprocessor
conditions (e.g. !EMBEDDED and defined(__linux__)), which caused the
netns headers and implementation to be entirely excluded from non-Linux
builds such as Emscripten. This in turn led to build failures in code
depending on the netns API, as the symbols and declarations were not
available at all.
Replace the hard-coded platform checks with explicit configure-time
capability detection. The build now checks for the concrete requirements
needed by netns and netdev support, including the availability of setns(), unshare(),
mount(), the CLONE_NEWNET macro and required headers.
Based on the result of these checks, USE_NETNS is defined and netns support
is either enabled or disabled in a controlled manner.
Netns and netdev support remains disabled for embedded builds.
No functional changes intended for platforms where netns is available.
Change-Id: I2322eb2936bea35596f1fd6b6a713ea5f997b1ea
---
M configure.ac
M include/osmocom/core/netdev.h
M include/osmocom/core/netns.h
M src/core/Makefile.am
M src/core/netdev.c
M src/core/netns.c
6 files changed, 50 insertions(+), 17 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/78/41878/6
To view, visit change 41878. To unsubscribe, or for help writing mail filters, visit settings.