summaryrefslogtreecommitdiff
path: root/src/skadns
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-10 18:06:26 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-10 18:06:26 +0000
commitbddb0bff603b3ff18121af143567571f21022009 (patch)
treeceea8157c21a883924c07120ab9998269de71ddd /src/skadns
parent29f70f35a48241eef0a690a00d5211f487972cba (diff)
downloads6-dns-bddb0bff603b3ff18121af143567571f21022009.tar.xz
Prepare for 2.3.5.2, adapt sig_ignore api
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/skadns')
-rw-r--r--src/skadns/skadnsd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/skadns/skadnsd.c b/src/skadns/skadnsd.c
index c405574..2a5c2fe 100644
--- a/src/skadns/skadnsd.c
+++ b/src/skadns/skadnsd.c
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <errno.h>
#include <signal.h>
+
#include <skalibs/types.h>
#include <skalibs/error.h>
#include <skalibs/strerr2.h>
@@ -14,10 +15,11 @@
#include <skalibs/iopause.h>
#include <skalibs/textmessage.h>
#include <skalibs/textclient.h>
+
#include <s6-dns/s6dns.h>
#include <s6-dns/skadns.h>
-typedef struct dnsio_s dnsio_t, *dnsio_t_ref ;
+typedef struct dnsio_s dnsio, *dnsio_ref ;
struct dnsio_s
{
unsigned int xindex ;
@@ -26,12 +28,12 @@ struct dnsio_s
} ;
#define DNSIO_ZERO { .xindex = SKADNS_MAXCONCURRENCY, .dt = S6DNS_ENGINE_ZERO, .id = 0 }
-static dnsio_t a[SKADNS_MAXCONCURRENCY] ;
+static dnsio a[SKADNS_MAXCONCURRENCY] ;
static unsigned int sp = 0 ;
static void remove (unsigned int i)
{
- dnsio_t tmp ;
+ dnsio tmp ;
tmp = a[sp-1] ;
a[--sp] = a[i] ;
a[i] = tmp ;
@@ -111,7 +113,7 @@ int main (void)
if (ndelay_on(0) < 0) strerr_diefu2sys(111, "ndelay_on ", "0") ;
if (ndelay_on(1) < 0) strerr_diefu2sys(111, "ndelay_on ", "1") ;
- if (sig_ignore(SIGPIPE) < 0) strerr_diefu1sys(111, "ignore SIGPIPE") ;
+ if (!sig_ignore(SIGPIPE)) strerr_diefu1sys(111, "ignore SIGPIPE") ;
tain_now_set_stopwatch_g() ;
if (!s6dns_init()) strerr_diefu1sys(111, "s6dns_init") ;
@@ -122,7 +124,7 @@ int main (void)
strerr_diefu1sys(111, "sync with client") ;
}
{
- static dnsio_t const zero = DNSIO_ZERO ;
+ static dnsio const zero = DNSIO_ZERO ;
unsigned int i = 0 ;
for (; i < SKADNS_MAXCONCURRENCY ; i++) a[i] = zero ;
}