chiark / gitweb /
sd-dns: initial commit
[elogind.git] / src / libsystemd-bus / dns-util.h
diff --git a/src/libsystemd-bus/dns-util.h b/src/libsystemd-bus/dns-util.h
new file mode 100644 (file)
index 0000000..31d19bd
--- /dev/null
@@ -0,0 +1,8 @@
+#pragma once
+
+DEFINE_TRIVIAL_CLEANUP_FUNC(asyncns_t*, asyncns_free);
+DEFINE_TRIVIAL_CLEANUP_FUNC(unsigned char *, asyncns_freeanswer);
+DEFINE_TRIVIAL_CLEANUP_FUNC(struct addrinfo*, asyncns_freeaddrinfo);
+#define _cleanup_asyncns_free_ _cleanup_(asyncns_freep)
+#define _cleanup_asyncns_answer_free_ _cleanup_(asyncns_freeanswerp)
+#define _cleanup_asyncns_addrinfo_free_ _cleanup_(asyncns_freeaddrinfop)