From 34bb501be08aa2b313d88e67d6e0a7e0a3f9cfa6 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 5 May 2024 00:07:30 +0200 Subject: New upstream version 1.47.90 --- src/libnm-std-aux/README.md | 16 ++++++++++++++++ src/libnm-std-aux/nm-linux-compat.h | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/libnm-std-aux/README.md (limited to 'src/libnm-std-aux') 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 #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" -- cgit 1.3.0-6-gf8a5