Attention is currently required from: pespin.
Timur Davydov has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/41878?usp=email )
Change subject: build: control USE_NETNS via configure.ac ......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS2:
So are you saying that once you build & run with emscripten you can really use the netns code just f […]
No, I'm not claiming that netns functionality is usable at runtime on the Web.
What actually fails without building netns support are compile-time errors in netdev.c. When netns.h is effectively disabled, netdev.c still references the netns API and types, which leads to build failures such as:
- incomplete type `struct osmo_netns_switch_state` - implicit declaration of `osmo_netns_open_fd()` - implicit declaration of `osmo_netns_switch_enter()` - implicit declaration of `osmo_netns_switch_exit()`
So the problem is not a runtime failure, but missing declarations when netns.h is excluded via conditional compilation.
The change makes the availability of netns code explicit at configure time (`USE_NETNS`) instead of hard-wiring it to `__linux__`, so the build can be structured consistently across targets.