diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-11-27 06:55:56 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-11-30 20:20:19 -0600 |
commit | a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832 (patch) | |
tree | fa39d984711c48daba34b1a2e12ab6a35df88f3d /user/elogind/fix-rlim-fmt.patch | |
parent | a023ea8b1755b895fb9e539262a2840aa0d65a49 (diff) | |
download | packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.tar.gz packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.tar.bz2 packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.tar.xz packages-a32c4b31c69dbfb6f391bccb9c1358fd2bb0c832.zip |
user/elogind: Update to 252.9
Ref: #1100
Diffstat (limited to 'user/elogind/fix-rlim-fmt.patch')
-rw-r--r-- | user/elogind/fix-rlim-fmt.patch | 40 |
1 files changed, 40 insertions, 0 deletions
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; + } |