summaryrefslogtreecommitdiff
path: root/src/clients/s6-dnsip.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-04 11:24:03 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-04 11:24:03 +0000
commit29f70f35a48241eef0a690a00d5211f487972cba (patch)
tree7153e8f6623aed91a7d98a4961730bd161ac8a1a /src/clients/s6-dnsip.c
parentffed76f91e3623f40d1ebffffc0bc728722c84f5 (diff)
downloads6-dns-29f70f35a48241eef0a690a00d5211f487972cba.tar.xz
Adapt to skalibs-2.11
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/clients/s6-dnsip.c')
-rw-r--r--src/clients/s6-dnsip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/clients/s6-dnsip.c b/src/clients/s6-dnsip.c
index 3b86fe0..06b8400 100644
--- a/src/clients/s6-dnsip.c
+++ b/src/clients/s6-dnsip.c
@@ -18,8 +18,8 @@
int main (int argc, char const *const *argv)
{
- genalloc ips = GENALLOC_ZERO ; /* ip46full_t */
- tain_t deadline ;
+ genalloc ips = GENALLOC_ZERO ; /* ip46full */
+ tain deadline ;
size_t i = 0 ;
unsigned int t = 0 ;
int flagqualify = 0 ;
@@ -28,7 +28,7 @@ int main (int argc, char const *const *argv)
for (;;)
{
- int opt = subgetopt(argc, argv, "qrt:") ;
+ int opt = lgetopt(argc, argv, "qrt:") ;
if (opt == -1) break ;
switch (opt)
{
@@ -50,13 +50,13 @@ int main (int argc, char const *const *argv)
if (r < 0) strerr_diefu2sys((errno == ETIMEDOUT) ? 99 : 111, "resolve ", argv[0]) ;
if (!r && errno) strerr_diefu4x(2, "resolve ", argv[0], ": ", s6dns_constants_error_str(errno)) ;
}
- if (!genalloc_len(ip46full_t, &ips)) return 1 ;
+ if (!genalloc_len(ip46full, &ips)) return 1 ;
- if (flagunsort) random_unsort(ips.s, genalloc_len(ip46full_t, &ips), sizeof(ip46full_t)) ;
- for (i = 0 ; i < genalloc_len(ip46full_t, &ips) ; i++)
+ if (flagunsort) random_unsort(ips.s, genalloc_len(ip46full, &ips), sizeof(ip46full)) ;
+ for (i = 0 ; i < genalloc_len(ip46full, &ips) ; i++)
{
char fmt[IP6_FMT] ;
- size_t n = ip46full_fmt(fmt, genalloc_s(ip46full_t, &ips) + i) ;
+ size_t n = ip46full_fmt(fmt, genalloc_s(ip46full, &ips) + i) ;
fmt[n++] = '\n' ;
if (buffer_put(buffer_1small, fmt, n) < (ssize_t)n)
strerr_diefu1sys(111, "write to stdout") ;