From a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Mon, 27 Nov 2023 06:55:56 -0600 Subject: user/elogind: Update to 252.9 Ref: #1100 --- user/elogind/fix-rlim-fmt.patch | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 user/elogind/fix-rlim-fmt.patch (limited to 'user/elogind/fix-rlim-fmt.patch') diff --git a/user/elogind/fix-rlim-fmt.patch b/user/elogind/fix-rlim-fmt.patch new file mode 100644 index 000000000..cfb943e48 --- /dev/null +++ b/user/elogind/fix-rlim-fmt.patch @@ -0,0 +1,40 @@ +%ju is uintmax_t which is unsigned long, not unsigned long long. + +Using the glibc code gives the same error - PRIu64 is unsigned long, not ll. + +Upstream-URL: https://github.com/elogind/elogind/issues/269 + +--- elogind-252.9/src/basic/format-util.h.old 2023-05-15 06:35:29.000000000 -0500 ++++ elogind-252.9/src/basic/format-util.h 2023-11-27 05:11:43.903588357 -0600 +@@ -34,7 +34,7 @@ + # error Unknown timex member size + #endif + +-#ifdef __GLIBC__ /// Go directly for %ju in elogind if not. Enhances musl-libc compatibility. ++#ifdef __GLIBC__ /// Go directly for %llu in elogind if not. Enhances musl-libc compatibility. + #if SIZEOF_RLIM_T == 8 + # define RLIM_FMT "%" PRIu64 + #elif SIZEOF_RLIM_T == 4 +@@ -43,7 +43,7 @@ + # error Unknown rlim_t size + #endif + #else // __GLIBC__ +-#define RLIM_FMT "%ju" ++#define RLIM_FMT "%llu" + #endif // __GLIBC__ + + #if SIZEOF_DEV_T == 8 +--- elogind-252.9/src/basic/rlimit-util.c.old 2023-05-15 06:35:29.000000000 -0500 ++++ elogind-252.9/src/basic/rlimit-util.c 2023-11-27 05:21:02.633167487 -0600 +@@ -407,11 +407,7 @@ + + rl.rlim_cur = FD_SETSIZE; + if (setrlimit(RLIMIT_NOFILE, &rl) < 0) +-#ifdef __GLIBC__ /// To be compatible with musl-libc, elogind uses an (uintmax_t) cast. + return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur); +-#else // __GLIBC__ +- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur); +-#endif // __GLIBC__ + + return 1; + } -- cgit v1.2.3-60-g2f50