summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-11-29 00:28:53 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-12-02 06:21:11 +0100
commitdeae09ccc50905747cb3a415180a833ccc8cd03b (patch)
treef5413a0b7d6fe5d6b197b6554f762273c7fb7d30 /src/systemd
parent5dd9527883e0aa8705cf81448bc4bdb0456382fb (diff)
downloadsystemd-deae09ccc50905747cb3a415180a833ccc8cd03b.tar.gz
libsystemd: introduce _sd_destroy_t
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/_sd-common.h2
-rw-r--r--src/systemd/sd-bus.h2
-rw-r--r--src/systemd/sd-event.h2
-rw-r--r--src/systemd/sd-netlink.h2
-rw-r--r--src/systemd/sd-resolve.h2
5 files changed, 6 insertions, 4 deletions
diff --git a/src/systemd/_sd-common.h b/src/systemd/_sd-common.h
index b026b5c551..9950339d54 100644
--- a/src/systemd/_sd-common.h
+++ b/src/systemd/_sd-common.h
@@ -23,6 +23,8 @@
# error "Do not include _sd-common.h directly; it is a private header."
#endif
+typedef void (*_sd_destroy_t)(void *userdata);
+
#ifndef _sd_printf_
# if __GNUC__ >= 4
# define _sd_printf_(a,b) __attribute__ ((__format__(printf, a, b)))
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index 220ddb99ec..4c1acab9f3 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -107,7 +107,7 @@ typedef int (*sd_bus_property_set_t) (sd_bus *bus, const char *path, const char
typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error);
typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error);
typedef int (*sd_bus_track_handler_t) (sd_bus_track *track, void *userdata);
-typedef void (*sd_bus_destroy_t)(void *userdata);
+typedef _sd_destroy_t sd_bus_destroy_t;
#include "sd-bus-protocol.h"
#include "sd-bus-vtable.h"
diff --git a/src/systemd/sd-event.h b/src/systemd/sd-event.h
index b15cade20a..787a12f241 100644
--- a/src/systemd/sd-event.h
+++ b/src/systemd/sd-event.h
@@ -77,7 +77,7 @@ typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si,
typedef void* sd_event_child_handler_t;
#endif
typedef int (*sd_event_inotify_handler_t)(sd_event_source *s, const struct inotify_event *event, void *userdata);
-typedef void (*sd_event_destroy_t)(void *userdata);
+typedef _sd_destroy_t sd_event_destroy_t;
int sd_event_default(sd_event **e);
diff --git a/src/systemd/sd-netlink.h b/src/systemd/sd-netlink.h
index e1b89559a8..20bff2838e 100644
--- a/src/systemd/sd-netlink.h
+++ b/src/systemd/sd-netlink.h
@@ -39,7 +39,7 @@ typedef enum {SD_GENL_ID_CTRL, SD_GENL_WIREGUARD, SD_GENL_FOU} sd_genl_family;
/* callback */
typedef int (*sd_netlink_message_handler_t)(sd_netlink *nl, sd_netlink_message *m, void *userdata);
-typedef void (*sd_netlink_destroy_t)(void *userdata);
+typedef _sd_destroy_t sd_netlink_destroy_t;
/* bus */
int sd_netlink_new_from_netlink(sd_netlink **nl, int fd);
diff --git a/src/systemd/sd-resolve.h b/src/systemd/sd-resolve.h
index 089fcdee37..93a9a8a440 100644
--- a/src/systemd/sd-resolve.h
+++ b/src/systemd/sd-resolve.h
@@ -42,7 +42,7 @@ typedef struct sd_resolve_query sd_resolve_query;
/* A callback on completion */
typedef int (*sd_resolve_getaddrinfo_handler_t)(sd_resolve_query *q, int ret, const struct addrinfo *ai, void *userdata);
typedef int (*sd_resolve_getnameinfo_handler_t)(sd_resolve_query *q, int ret, const char *host, const char *serv, void *userdata);
-typedef void (*sd_resolve_destroy_t)(void *userdata);
+typedef _sd_destroy_t sd_resolve_destroy_t;
enum {
SD_RESOLVE_GET_HOST = 1 << 0,