Attention is currently required from: Timur Davydov.
pespin 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:
No, I'm not claiming that netns functionality is usable at runtime on the Web. […]
@dtv.comp@gmail.com so, the facts are, afaiu, in order (let me know if I understood correctly): * Code inside netns.c and netns.h is guarded by "defined(__linux__)", which effectively disables its code when building with emscripten * Currently netdev.c and/or tun.c fail to build if netns.c code is disabled (!defined(__linux)__)
My proposal: * Try to remove the defined(__linux__) in netns.c ** if everything compiles fine with emscripten, submit a patch that way: using a netns in netdev/tun will simply fail at runtime ** if compilation files (eg. because unshare(), mount() or setns() are unavailable), then add a configure.ac block to check for any of those which fails and based on that, in netns.c change the code path with #ifdef HAVE_* to return -ENOSUP; or similar.
^ In your commit, please explain the result of all that, with explicit errors, missing functions, etc.