summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-11-18 23:09:46 +0000
committerLaurent Bercot <ska@appnovation.com>2023-11-18 23:09:46 +0000
commit20d8277451d8fd7cbce316b80a0018bc2639335d (patch)
tree925753f6acdf8afc7e9877db2e9d2d88f1c0f47c /src
parentd06529686f89074fd4fa574ac6012f8a873e7857 (diff)
downloads6-dns-20d8277451d8fd7cbce316b80a0018bc2639335d.tar.xz
Fix old _BSD_SOURCE definitions
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/s6-dns/hosts.h2
-rw-r--r--src/libs6dns/s6dns_debug_dumpdt_pre_send.c8
-rw-r--r--src/skadns/skadns_cancel.c7
-rw-r--r--src/skadns/skadns_release.c7
4 files changed, 12 insertions, 12 deletions
diff --git a/src/include/s6-dns/hosts.h b/src/include/s6-dns/hosts.h
index f9ac48e..4d7f1c8 100644
--- a/src/include/s6-dns/hosts.h
+++ b/src/include/s6-dns/hosts.h
@@ -3,6 +3,7 @@
#ifndef S6DNS_HOSTS_H
#define S6DNS_HOSTS_H
+#include <skalibs/ip46.h>
#include <skalibs/cdb.h>
#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
@@ -26,6 +27,7 @@ extern int s6dns_hosts_name_r (cdb const *, char const *, stralloc *, genalloc *
#define s6dns_hosts_name(ip, sa, ga, is6) s6dns_hosts_name_r(&s6dns_hosts_here, (ip), sa, ga, is6)
#define s6dns_hosts_name4(ip, sa, ga) s6dns_hosts_name4_r(&s6dns_hosts_here, (ip), sa, ga)
#define s6dns_hosts_name6(ip, sa, ga) s6dns_hosts_name6_r(&s6dns_hosts_here, (ip), sa, ga)
+#define s6dns_hosts_name46(i, sa, ga) s6dns_hosts_name((i)->ip, sa, (ga), (i)->is6)
/* name to IP. noq: name is an fqdn. unq: name is unqualified. */
diff --git a/src/libs6dns/s6dns_debug_dumpdt_pre_send.c b/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
index 0d4ae19..c64f2ca 100644
--- a/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
+++ b/src/libs6dns/s6dns_debug_dumpdt_pre_send.c
@@ -1,17 +1,17 @@
/* ISC license */
-/* For EOVERFLOW in OpenBSD */
-#ifndef _BSD_SOURCE
-#define _BSD_SOURCE
-#endif
+/* For EOVERFLOW */
+#include <skalibs/bsdsnowflake.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
+
#include <skalibs/uint16.h>
#include <skalibs/genwrite.h>
#include <skalibs/djbtime.h>
#include <skalibs/ip46.h>
+
#include <s6-dns/s6dns-ip46.h>
#include <s6-dns/s6dns-analyze.h>
#include <s6-dns/s6dns-debug.h>
diff --git a/src/skadns/skadns_cancel.c b/src/skadns/skadns_cancel.c
index 3b8eff6..2b3753f 100644
--- a/src/skadns/skadns_cancel.c
+++ b/src/skadns/skadns_cancel.c
@@ -1,15 +1,14 @@
/* ISC license. */
-/* OpenBSD sucks. In other news, the sky is blue. */
-#ifndef _BSD_SOURCE
-#define _BSD_SOURCE
-#endif
+#include <skalibs/bsdsnowflake.h>
#include <errno.h>
+
#include <skalibs/uint16.h>
#include <skalibs/error.h>
#include <skalibs/gensetdyn.h>
#include <skalibs/textclient.h>
+
#include <s6-dns/skadns.h>
int skadns_cancel (skadns_t *a, uint16_t id, tain const *deadline, tain *stamp)
diff --git a/src/skadns/skadns_release.c b/src/skadns/skadns_release.c
index 26c9c4f..c64016c 100644
--- a/src/skadns/skadns_release.c
+++ b/src/skadns/skadns_release.c
@@ -1,13 +1,12 @@
/* ISC license. */
-/* OpenBSD sucks. More news at 11. */
-#ifndef _BSD_SOURCE
-#define _BSD_SOURCE
-#endif
+#include <skalibs/bsdsnowflake.h>
#include <errno.h>
+
#include <skalibs/alloc.h>
#include <skalibs/gensetdyn.h>
+
#include <s6-dns/skadns.h>
int skadns_release (skadns_t *a, uint16_t id)