void-packages/srcpkgs/elogind/patches/fix-musl.patch

15 lines
828 B
Diff

Avoid error when building dependencies for *-musl where
_POSIC_C_SOURCE may be undefined.
--- src/systemd/sd-event.h 2018-03-09 07:57:50.000000000 +0100
+++ src/systemd/sd-event.h 2018-03-20 12:27:32.641946537 +0100
@@ -69,7 +69,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;