From 841270ec87e133702d2e1dc5c6e08057ecb8aee7 Mon Sep 17 00:00:00 2001 From: Derriick Date: Tue, 19 Feb 2019 22:10:23 +0100 Subject: [PATCH] elogind: fix building of sway with musl When trying to build sway-1.0-rc3 with musl, meson stops and indicates that _POSIX_C_SOURCE is not defined in src/systemd/sd-event.h --- srcpkgs/elogind/patches/musl.patch | 11 +++++++++++ srcpkgs/elogind/template | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/elogind/patches/musl.patch diff --git a/srcpkgs/elogind/patches/musl.patch b/srcpkgs/elogind/patches/musl.patch new file mode 100644 index 00000000000..6ed531eaab3 --- /dev/null +++ b/srcpkgs/elogind/patches/musl.patch @@ -0,0 +1,11 @@ +--- src/systemd/sd-event.h ++++ src/systemd/sd-event.h +@@ -71,7 +71,7 @@ + typedef int (*sd_event_io_handler_t)(sd_event_source *s, int fd, uint32_t revents, void *userdata); + typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata); + typedef int (*sd_event_signal_handler_t)(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata); +-#if defined _GNU_SOURCE || _POSIX_C_SOURCE >= 199309L ++#if defined _GNU_SOURCE || (defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 199309L) + typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata); + #else + typedef void* sd_event_child_handler_t; diff --git a/srcpkgs/elogind/template b/srcpkgs/elogind/template index 107212c8e1e..b73c883bc51 100644 --- a/srcpkgs/elogind/template +++ b/srcpkgs/elogind/template @@ -1,7 +1,7 @@ # Template file for 'elogind' pkgname=elogind version=239.3 -revision=2 +revision=3 build_style=meson configure_args="-Dcgroup-controller=elogind -Dhalt-path=/usr/bin/halt -Drootlibexecdir=/usr/libexec/elogind -Dreboot-path=/usr/bin/reboot