Skip to content

[th/clean-includes] cleanup for includes of default headers

Thomas Haller requested to merge th/clean-includes into main

as documented in https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/3fff6770f828d544ddafe2f5effbea20250957b8/CONTRIBUTING.md#header-includes, there is a certain scheme how we include default headers.

Fix a few minor issues about this.


Interestingly, while testing the branch, I got a linker error about a static inline function. Obviously, the header was included (so the static inline function was visible in the first place), but then a linker error??? I tried to #include nm-shared-utils.h a second time, which avoided the linker error... despite, the header already included before and the second include having no effect (due to the include guard). A few times back and forth, the error was gone and I cannot reproduce. Yes, I did ccache -C early, but that alone didn't fix it. So, dunno. Note that gitlab-ci of this change passed fully and there is also a copr build (which tests various archs). The latter passed too.

So something seems odd, but I cannot put my finger on it. In any case, this branch seems correct to me.

Merge request reports