elogind: add patches to fix elogind on musl

Add these patches for glibc too as they make sense.
This commit is contained in:
Enno Boland 2019-04-07 12:24:44 +02:00 committed by maxice8
parent 85eb8ae260
commit 5c978f7aab
3 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,13 @@
diff --git ./src/basic/fileio.c ./src/basic/fileio.c
index e981cd024..ffcbf7309 100644
--- ./src/basic/fileio.c
+++ ./src/basic/fileio.c
@@ -156,7 +156,7 @@ int write_string_file_ts(
goto fail;
}
- f = fdopen(fd, "w");
+ f = fdopen(fd, "we");
if (!f) {
r = -errno;
safe_close(fd);

View file

@ -0,0 +1,13 @@
diff --git ./src/basic/cgroup-util.c ./src/basic/cgroup-util.c
index 9235361b6..11102790e 100644
--- ./src/basic/cgroup-util.c
+++ ./src/basic/cgroup-util.c
@@ -824,7 +824,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
xsprintf(c, PID_FMT "\n", pid);
- r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER);
+ r = write_string_file(fs, c, 0);
if (r < 0)
return r;

View file

@ -1,7 +1,7 @@
# Template file for 'elogind'
pkgname=elogind
version=241.2
revision=1
revision=2
build_style=meson
configure_args="-Dcgroup-controller=elogind -Dhalt-path=/usr/bin/halt
-Drootlibexecdir=/usr/libexec/elogind -Dreboot-path=/usr/bin/reboot