summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-11 13:46:12 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-03-11 13:46:12 -0500
commitb2542bf9ab6cce97fcb67ff9536e1062c70b5b11 (patch)
tree0203d5e6a9a90a07d6735590cdddf78068c777e1 /src
parent0cb27225e9c658d80538ace7a267ba0a2d2f44f2 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/systemd/sd-event.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h
index 1ea97e47f8..9ded022624 100644
--- a/src/systemd/sd-event.h
+++ b/src/systemd/sd-event.h
@@ -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);