check for _POSIX_C_SOURCE instead of __USE_POSIX*

check for _GNU_SOURCE as well as sd_event_child_handler_t needs to be
defined correctly while compiling systemd
This commit is contained in:
Matija Skala
2017-03-16 03:29:53 +01:00
parent e5276995ae
commit 2797366cd2
+1 -1
View File
@@ -69,7 +69,7 @@ typedef int (*sd_event_handler_t)(sd_event_source *s, void *userdata);
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 __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED
#if defined _GNU_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;