NetworkManager/src/linux-headers
Thomas Haller 231671fd02
all: add src/nm-compat-headers for patching included system headers
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".
2022-09-23 11:43:33 +02:00
..
ethtool.h linux-headers: add ethtool.h kernel header 2021-09-06 10:00:36 +02:00
mptcp.h linux-headers: include "mptcp.h" kernel header 2022-07-20 10:23:04 +02:00
nl80211-vnd-intel.h linux-headers: add nl80211-vnd-intel.h kernel header 2022-03-07 10:55:33 +02:00
nl802154.h linux-headers: update nl802154.h kernel header 2021-09-06 10:00:36 +02:00
README.md all: add src/nm-compat-headers for patching included system headers 2022-09-23 11:43:33 +02:00

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.