diff options
| author | Michael Biebl <biebl@debian.org> | 2024-05-05 00:07:30 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-05-05 00:07:30 +0200 |
| commit | 34bb501be08aa2b313d88e67d6e0a7e0a3f9cfa6 (patch) | |
| tree | 4e6220877828be4c6f261de09ec0cb2d80e32389 /src/libnm-std-aux | |
| parent | bba2e4b4de668db525cbfdfc35292e5a0b51671a (diff) | |
New upstream version 1.47.90 upstream/1.47.90
Diffstat (limited to 'src/libnm-std-aux')
| -rw-r--r-- | src/libnm-std-aux/README.md | 16 | ||||
| -rw-r--r-- | src/libnm-std-aux/nm-linux-compat.h | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/libnm-std-aux/README.md b/src/libnm-std-aux/README.md new file mode 100644 index 00000000..ccc48e9d --- /dev/null +++ b/src/libnm-std-aux/README.md @@ -0,0 +1,16 @@ +libnm-std-aux +============= + +A static helper library with general purpose helpers on top of +standard C (C11). + +As this has no additional dependencies, we should have all our C code +use this internal helper library. It contains helpers that should be +available (and used) everywhere where we write C. + +Our C is gnu11, that is C11 or newer with some GCC-ism. The requirement +is that it is supported by all complilers we care about (in pratice GCC +and Clang). + +Parts of this library are usually already included via the `nm-default*.h` +headers. diff --git a/src/libnm-std-aux/nm-linux-compat.h b/src/libnm-std-aux/nm-linux-compat.h index 2b04b0df..9bfdb365 100644 --- a/src/libnm-std-aux/nm-linux-compat.h +++ b/src/libnm-std-aux/nm-linux-compat.h @@ -16,7 +16,7 @@ #include <linux/const.h> #ifndef __KERNEL_DIV_ROUND_UP -#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) -1) / (d)) +#define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) #endif #include "linux-headers/ethtool.h" |