mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 14:10:08 +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". |
||
|---|---|---|
| .. | ||
| linux | ||
| README.md | ||
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.