mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 16:00:07 +01:00
We already have src/linux-headers, where we have complete copies of linux user space headers. Of course that exists, because we want to use certain features and don't depend on the installed kernel headers. Which works well, because kernel user space API is stable, and we anyway want to support compiling against a newer kernel and run against an older (e.g. in a container). So having our copy of newer kernel headers is merely as if we compiled against as newer kernel. Add "src/nm-compat-headers" which has a similar purpose, but a different approach. Instead of replacing the included header entirely, include the system header and patch it with #define. Use this for "linux/if_addr.h". Of course, the approach here is that we no longer include <linux/if_addr.h> directly, but instead include "nm-compat-headers/linux/if_addr.h". |
||
|---|---|---|
| .. | ||
| ethtool.h | ||
| mptcp.h | ||
| nl80211-vnd-intel.h | ||
| nl802154.h | ||
| README.md | ||
linux-headers
Contains a copy of Linux UAPI kernel headers. When we build against an older kernel, we may still want to unconditionally build against a certain version of kernel API.
These headers should be taken without modification from Linux.
Don't include any of these these headers directly, instead include "libnm-std-aux/nm-linux-compat.h" which drags these headers in. This ensures that we include at all places our own patched variant, instead of the system headers.