diff options
author | Jory Pratt <anarchy@gentoo.org> | 2019-04-18 14:12:21 -0500 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2019-04-18 14:14:04 -0500 |
commit | a28bbe7cb1a166b1b71c20e3a4d2734e0593de76 (patch) | |
tree | 2daa8a0ffa9dcc09284eb7e2001f957d6dec9fc0 /sys-auth | |
parent | dev-java/openjdk: bump to 11.0.3_p7 (diff) | |
download | gentoo-a28bbe7cb1a166b1b71c20e3a4d2734e0593de76.tar.gz gentoo-a28bbe7cb1a166b1b71c20e3a4d2734e0593de76.tar.bz2 gentoo-a28bbe7cb1a166b1b71c20e3a4d2734e0593de76.zip |
sys-auth/elogind: fix musl unable to write to cgroup
Package-Manager: Portage-2.3.63, Repoman-2.3.12
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'sys-auth')
-rw-r--r-- | sys-auth/elogind/elogind-241.2.ebuild | 1 | ||||
-rw-r--r-- | sys-auth/elogind/files/elogind-241.2-unbreak-musl.patch | 41 |
2 files changed, 42 insertions, 0 deletions
diff --git a/sys-auth/elogind/elogind-241.2.ebuild b/sys-auth/elogind/elogind-241.2.ebuild index 37406f56c438..2b18cff05a4b 100644 --- a/sys-auth/elogind/elogind-241.2.ebuild +++ b/sys-auth/elogind/elogind-241.2.ebuild @@ -42,6 +42,7 @@ PDEPEND=" DOCS=( src/libelogind/sd-bus/GVARIANT-SERIALIZATION ) PATCHES=( + "${FILESDIR}/${PN}-241.2-unbreak-musl.patch" "${FILESDIR}/${PN}-241.1-docs.patch" ) diff --git a/sys-auth/elogind/files/elogind-241.2-unbreak-musl.patch b/sys-auth/elogind/files/elogind-241.2-unbreak-musl.patch new file mode 100644 index 000000000000..3688402d2e09 --- /dev/null +++ b/sys-auth/elogind/files/elogind-241.2-unbreak-musl.patch @@ -0,0 +1,41 @@ +From cac266581e2bc3595be60171910db6274c3bf944 Mon Sep 17 00:00:00 2001 +From: Sven Eden <sven.eden@prydeworx.com> +Date: Thu, 18 Apr 2019 19:25:55 +0200 +Subject: [PATCH] src/basic/filio.c: Do not disable file buffers on non-glibc + [#130] + +When opening an existing file with open() and then turning is into +a FILE* with fdopen(), a following fputs() returns EOF and sets errno +to EINVAL on musl-libc based systems when setvbuf() was used to turn +off the file buffer. + +To remedy this return to the old behavior until v239 and never +diesable the file buffer in such cases when not on a glibc based +system. + +Bug: #130 +Closes: #130 +Signed-off-by: Sven Eden <sven.eden@prydeworx.com> +--- + src/basic/fileio.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/basic/fileio.c b/src/basic/fileio.c +index e981cd024..eaad5ccf0 100644 +--- a/src/basic/fileio.c ++++ b/src/basic/fileio.c +@@ -162,6 +162,11 @@ int write_string_file_ts( + safe_close(fd); + goto fail; + } ++ ++#ifndef __GLIBC__ /// elogind must not disable buffers on musl-libc based systems when going this route ++ if (flags & WRITE_STRING_FILE_DISABLE_BUFFER) ++ flags ^= WRITE_STRING_FILE_DISABLE_BUFFER; ++#endif // __GLIBC__ + } + + (void) __fsetlocking(f, FSETLOCKING_BYCALLER); +-- +2.21.0 + |