NetworkManager/src/nm-compat-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
..
linux all: add src/nm-compat-headers for patching included system headers 2022-09-23 11:43:33 +02:00
README.md all: add src/nm-compat-headers for patching included system headers 2022-09-23 11:43:33 +02:00

nm-compat-headers

When we build against older system headers, we sometimes want to use newer features. This directory contains compat headers that patch the included sources with what we need.

The goal is similar to linux-headers directory, but the approach is different. The former completely replaces system headers while this uses system headers and extends them.