about summary refs log tree commit diff
path: root/src/libnm-std-aux
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2021-09-27 13:36:59 +0200
committerSebastien Bacher <seb128@ubuntu.com>2021-09-27 13:38:47 +0200
commit77097921e09de99e0b66b43a541ec35004e64630 (patch)
treec36633d782404ea31955254a2133cf9cf036d81e /src/libnm-std-aux
parent0e7561c087918ef6b0e8a64155109d3b005e700c (diff)
parent2bfcbfb13b1672c072e4f902260d2122b3e3c122 (diff)
Update upstream source from tag 'upstream/1.32.12'
Update to upstream version '1.32.12'
with Debian dir 8a9c3ca7f117acef29e7880aa507a1c3ab742155
Diffstat (limited to 'src/libnm-std-aux')
-rw-r--r--src/libnm-std-aux/nm-linux-compat.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/libnm-std-aux/nm-linux-compat.h b/src/libnm-std-aux/nm-linux-compat.h
new file mode 100644
index 00000000..7492d527
--- /dev/null
+++ b/src/libnm-std-aux/nm-linux-compat.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#ifndef __NM_LINUX_COMPAT_H__
+#define __NM_LINUX_COMPAT_H__
+
+/* We have copies of linux UAPI headers in `src/linux-headers` which
+ * should be preferred over the headers on the system. However, these
+ * newer headers might be incompatible with the installed UAPI headers.
+ *
+ * This nm-linux-compat.h header tries to solve that and apply the necessary
+ * workarounds.
+ *
+ * Unlike most NetworkManager headers, this header needs to be included
+ * *before* most system headers. */
+
+#include <linux/const.h>
+
+#ifndef __KERNEL_DIV_ROUND_UP
+    #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) -1) / (d))
+#endif
+
+#include "linux-headers/ethtool.h"
+#include "linux-headers/nl802154.h"
+
+#endif /* __NM_LINUX_COMPAT_H__ */