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: detect netns support via configure-time capability checks ......................................................................
Patch Set 6:
(1 comment)
File include/osmocom/core/netdev.h:
https://gerrit.osmocom.org/c/libosmocore/+/41878/comment/cb764712_f2987e37?u... : PS6, Line 6: #include "config.h"
You cannot include config here, since this is a public header used by other projects, while "config. […]
Understood, thanks for pointing this out.
You're right: config.h must not be included from a public header. The reason I added it was to fix a compilation error in gprs_ns2_fr.c, where config.h is included after netdev.h, so the required USE_NETNS defines were not visible.
I'll rework this accordingly and remove the config.h include from the public header. As discussed, I'll instead keep the API visible and guard the implementation with HAVE_* checks, returning -ENOTSUP where the required features are unavailable.