1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

headers: do not use siginfo_t if not defined

Simply avoid the trouble and use a void* if the define
is missing. We lose type safety, but who cares.
sigaction(2) says that siginfo_t requires _POSIX_C_SOURCE >= 199309L,
but we can be a bit more generous and use the same define
as /usr/include/signal.h.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-03-11 13:46:12 -05:00
parent 0cb27225e9
commit b2542bf9ab

View File

@ -69,7 +69,11 @@ 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
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;
#endif
int sd_event_default(sd_event **e);