summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-10 09:20:01 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-10 09:20:01 +0000
commit7a0f84ec90d6a7167e0be9de80b891596fa0c262 (patch)
treec0cb23b0a50fa2734286c936fbbb0dae24c2ec1f /src
parent416ef5e2bf59bb2e45066a1d5d91ac677c0f48e5 (diff)
downloads6-dns-7a0f84ec90d6a7167e0be9de80b891596fa0c262.tar.xz
Compiling bugfixes, small doc update
Diffstat (limited to 'src')
-rw-r--r--src/clients/s6-dnsname.c5
-rw-r--r--src/clients/s6dns_namescanner.c2
-rw-r--r--src/include/s6-dns/s6dns-rci.h6
-rw-r--r--src/include/s6-dns/s6dns-resolve.h12
-rw-r--r--src/include/s6-dns/skadns.h3
-rw-r--r--src/libs6dns/s6dns_analyze_packet.c2
-rw-r--r--src/libs6dns/s6dns_constants_error_str.c2
-rw-r--r--src/libs6dns/s6dns_engine.c2
-rw-r--r--src/libs6dns/s6dns_message_get_domain.c2
-rw-r--r--src/skadns/skadns_send.c2
-rw-r--r--src/skadns/skadns_update.c2
-rw-r--r--src/skadns/skadnsd.c4
12 files changed, 21 insertions, 23 deletions
diff --git a/src/clients/s6-dnsname.c b/src/clients/s6-dnsname.c
index d65da3a..fe5ab9a 100644
--- a/src/clients/s6-dnsname.c
+++ b/src/clients/s6-dnsname.c
@@ -1,6 +1,7 @@
/* ISC license. */
#include <errno.h>
+#include <skalibs/uint.h>
#include <skalibs/sgetopt.h>
#include <skalibs/strerr2.h>
#include <skalibs/buffer.h>
@@ -9,7 +10,7 @@
#include <skalibs/genalloc.h>
#include <skalibs/ip46.h>
#include <skalibs/random.h>
-#include <skalibs/s6dns.h>
+#include <s6-dns/s6dns.h>
#define USAGE "s6-dnsname [ -4 | -6 ] [ -r ] [ -t timeout ] ip"
#define dieusage() strerr_dieusage(100, USAGE)
@@ -66,7 +67,7 @@ int main (int argc, char const *const *argv)
char buf[S6DNS_FMT_DOMAINLIST(genalloc_len(s6dns_domain_t, &ds))] ;
unsigned int len = s6dns_fmt_domainlist(buf, S6DNS_FMT_DOMAINLIST(genalloc_len(s6dns_domain_t, &ds)), genalloc_s(s6dns_domain_t, &ds), genalloc_len(s6dns_domain_t, &ds), "\n", 1) ;
if (!len) strerr_diefu1sys(111, "format result") ;
- if (buffer_putalign(buffer_1, buf, len) < 0) goto err ;
+ if (buffer_put(buffer_1, buf, len) < 0) goto err ;
}
if (buffer_putflush(buffer_1, "\n", 1) < 0) goto err ;
return 0 ;
diff --git a/src/clients/s6dns_namescanner.c b/src/clients/s6dns_namescanner.c
index b23fb3d..136b1e8 100644
--- a/src/clients/s6dns_namescanner.c
+++ b/src/clients/s6dns_namescanner.c
@@ -1,7 +1,7 @@
/* ISC license. */
#include <s6-dns/s6dns-domain.h>
-#include <s6-dns/s6dns-generic-filter.h>
+#include "s6dns-generic-filter.h"
unsigned int s6dns_namescanner (s6dns_domain_t *d, char const *s)
{
diff --git a/src/include/s6-dns/s6dns-rci.h b/src/include/s6-dns/s6dns-rci.h
index 5822a71..326e029 100644
--- a/src/include/s6-dns/s6dns-rci.h
+++ b/src/include/s6-dns/s6dns-rci.h
@@ -4,9 +4,9 @@
#define S6DNS_RCI_H
#include <skalibs/stralloc.h>
-#include <skalibs/s6dns-constants.h>
-#include <skalibs/s6dns-ip46.h>
-#include <skalibs/s6dns-domain.h>
+#include <s6-dns/s6dns-constants.h>
+#include <s6-dns/s6dns-ip46.h>
+#include <s6-dns/s6dns-domain.h>
/* rci: resolv.conf information */
diff --git a/src/include/s6-dns/s6dns-resolve.h b/src/include/s6-dns/s6dns-resolve.h
index d188a67..e7eb629 100644
--- a/src/include/s6-dns/s6dns-resolve.h
+++ b/src/include/s6-dns/s6dns-resolve.h
@@ -10,12 +10,12 @@
#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
#include <skalibs/ip46.h>
-#include <skalibs/s6dns-constants.h>
-#include <skalibs/s6dns-ip46.h>
-#include <skalibs/s6dns-domain.h>
-#include <skalibs/s6dns-message.h>
-#include <skalibs/s6dns-engine.h>
-#include <skalibs/s6dns-rci.h>
+#include <s6-dns/s6dns-constants.h>
+#include <s6-dns/s6dns-ip46.h>
+#include <s6-dns/s6dns-domain.h>
+#include <s6-dns/s6dns-message.h>
+#include <s6-dns/s6dns-engine.h>
+#include <s6-dns/s6dns-rci.h>
/*
Synchronous DNS resolution primitives.
diff --git a/src/include/s6-dns/skadns.h b/src/include/s6-dns/skadns.h
index d5ed82f..b58363a 100644
--- a/src/include/s6-dns/skadns.h
+++ b/src/include/s6-dns/skadns.h
@@ -4,11 +4,8 @@
#define SKADNS_H
#include <errno.h>
-#include <skalibs/config.h>
#include <skalibs/uint16.h>
-#include <skalibs/uint32.h>
#include <skalibs/tai.h>
-#include <skalibs/stralloc.h>
#include <skalibs/genalloc.h>
#include <skalibs/gensetdyn.h>
#include <skalibs/skaclient.h>
diff --git a/src/libs6dns/s6dns_analyze_packet.c b/src/libs6dns/s6dns_analyze_packet.c
index 57a5ce5..8932ab3 100644
--- a/src/libs6dns/s6dns_analyze_packet.c
+++ b/src/libs6dns/s6dns_analyze_packet.c
@@ -3,9 +3,9 @@
#include <errno.h>
#include <skalibs/error.h>
#include <skalibs/uint16.h>
+#include <skalibs/uint.h>
#include <skalibs/bytestr.h>
#include <skalibs/genwrite.h>
-#include <skalibs/fmtscan.h>
#include <s6-dns/s6dns-constants.h>
#include <s6-dns/s6dns-domain.h>
#include <s6-dns/s6dns-message.h>
diff --git a/src/libs6dns/s6dns_constants_error_str.c b/src/libs6dns/s6dns_constants_error_str.c
index 9dda1a7..6d477c2 100644
--- a/src/libs6dns/s6dns_constants_error_str.c
+++ b/src/libs6dns/s6dns_constants_error_str.c
@@ -5,7 +5,7 @@
char const *s6dns_constants_error_str (int e)
{
- s6dns_constants_error_message_t *p = s6dns_constants_error ;
+ s6dns_constants_error_message_t const *p = s6dns_constants_error ;
while ((p->num != e) && (p->num != -1)) p++ ;
return p->num == -1 ? error_str(e) : p->string ;
}
diff --git a/src/libs6dns/s6dns_engine.c b/src/libs6dns/s6dns_engine.c
index 4145ef7..207069e 100644
--- a/src/libs6dns/s6dns_engine.c
+++ b/src/libs6dns/s6dns_engine.c
@@ -14,9 +14,9 @@
#include <skalibs/ip46.h>
#include <skalibs/random.h>
#include <s6-dns/s6dns-constants.h>
-#include <s6-dns/s6dns-message-internal.h>
#include <s6-dns/s6dns-message.h>
#include <s6-dns/s6dns-engine.h>
+#include "s6dns-message-internal.h"
/* Utility functions */
diff --git a/src/libs6dns/s6dns_message_get_domain.c b/src/libs6dns/s6dns_message_get_domain.c
index b51adb5..7d2cfc6 100644
--- a/src/libs6dns/s6dns_message_get_domain.c
+++ b/src/libs6dns/s6dns_message_get_domain.c
@@ -1,8 +1,8 @@
/* ISC license. */
#include <s6-dns/s6dns-domain.h>
-#include <s6-dns/s6dns-message-internal.h>
#include <s6-dns/s6dns-message.h>
+#include "s6dns-message-internal.h"
int s6dns_message_get_domain (s6dns_domain_t *d, char const *packet, unsigned int packetlen, unsigned int *pos)
{
diff --git a/src/skadns/skadns_send.c b/src/skadns/skadns_send.c
index 7ee04c7..f8152b7 100644
--- a/src/skadns/skadns_send.c
+++ b/src/skadns/skadns_send.c
@@ -18,7 +18,7 @@ int skadns_send (skadns_t *a, uint16 *u, s6dns_domain_t const *d, uint16 qtype,
unsigned int i ;
char tmp[17] = "--Q" ;
char err ;
- siovec_t v[2] = { { .s = tmp, .len = 17 }, { .s = d->s, .len = d->len } } ;
+ siovec_t v[2] = { { .s = tmp, .len = 17 }, { .s = (char *)d->s, .len = d->len } } ;
if (!gensetdyn_new(&a->q, &i)) return 0 ;
uint16_pack_big(tmp, (uint16)i) ;
uint16_pack_big(tmp + 3, qtype) ;
diff --git a/src/skadns/skadns_update.c b/src/skadns/skadns_update.c
index 50f3611..3a86b57 100644
--- a/src/skadns/skadns_update.c
+++ b/src/skadns/skadns_update.c
@@ -9,7 +9,7 @@
#include <skalibs/gensetdyn.h>
#include <skalibs/unixmessage.h>
#include <skalibs/skaclient.h>
-#include <s6/skadns.h>
+#include <s6-dns/skadns.h>
static int msghandler (unixmessage_t const *m, void *context)
{
diff --git a/src/skadns/skadnsd.c b/src/skadns/skadnsd.c
index 7b5419f..473ed1a 100644
--- a/src/skadns/skadnsd.c
+++ b/src/skadns/skadnsd.c
@@ -37,7 +37,7 @@ static void remove (unsigned int i)
static void fail (unsigned int i)
{
char pack[3] ;
- unixmessage_t m = { .s = pack, len = 3, .fds = 0, .nfds = 0 } ;
+ unixmessage_t m = { .s = pack, .len = 3, .fds = 0, .nfds = 0 } ;
uint16_pack_big(pack, a[i].id) ;
pack[2] = a[i].dt.status ;
s6dns_engine_recycle(&a[i].dt) ;
@@ -178,7 +178,7 @@ int main (void)
unixmessage_v_t mv = { .v = v, .vlen = 2, .fds = 0, .nfds = 0 } ;
uint16_pack_big(pack, a[i].id) ;
pack[2] = 0 ;
- if (!unixmessage_putv(unixmessage_sender_x, v, 2))
+ if (!unixmessage_putv(unixmessage_sender_x, &mv))
strerr_diefu1sys(111, "unixmessage_put") ;
s6dns_engine_recycle(&a[i].dt) ;
remove(i--) ;