From: Thomas Weißschuh Date: Fri, 8 Dec 2023 17:10:44 +0000 (+0100) Subject: dmesg: open-code LOG_MAKEPRI X-Git-Tag: v2.39.4~17 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=e24dadc764b7dbe92e30eb6ece169763d6d5eec5;p=thirdparty%2Futil-linux.git dmesg: open-code LOG_MAKEPRI LOG_MAKEPRI between musl and glibc differ in their behavior. musl performs the '<< 3' as part of the macro while glibc expects the caller to do so. Just provide our own implementation to avoid the issue. Signed-off-by: Thomas Weißschuh (cherry picked from commit 38a4480bbf807b26bedf39f68c81b20828681b02) --- diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index 6755f7ea3d..5a794834c3 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -125,7 +125,7 @@ static const struct dmesg_name level_names[] = * shifted code :-) */ #define FAC_BASE(f) ((f) >> 3) -#define LOG_RAW_FAC_PRI(fac, pri) LOG_MAKEPRI((fac << 3), (pri)) +#define LOG_RAW_FAC_PRI(fac, pri) ((fac << 3) | pri) static const struct dmesg_name facility_names[] = {