summaryrefslogtreecommitdiff
path: root/src/libs6/s6_fdholder_setdump.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-09 23:42:35 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-09 23:42:35 +0000
commitaaea6322e9e765969f452764e51ca1ddd9783264 (patch)
tree4e863537677e0266a79c4045c47a5e6b9f64a1a8 /src/libs6/s6_fdholder_setdump.c
parentce2977ee9195612730bc8713f142c95f79605e75 (diff)
downloads6-aaea6322e9e765969f452764e51ca1ddd9783264.tar.xz
skalibs-2.11.0.0 API change
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6/s6_fdholder_setdump.c')
-rw-r--r--src/libs6/s6_fdholder_setdump.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libs6/s6_fdholder_setdump.c b/src/libs6/s6_fdholder_setdump.c
index d5a292c..8c5ae6e 100644
--- a/src/libs6/s6_fdholder_setdump.c
+++ b/src/libs6/s6_fdholder_setdump.c
@@ -5,7 +5,6 @@
#include <string.h>
#include <errno.h>
-#include <skalibs/posixishard.h>
#include <skalibs/uint32.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/bytestr.h>
@@ -15,7 +14,9 @@
#include <s6/s6-fdholder.h>
-int s6_fdholder_setdump (s6_fdholder_t *a, s6_fdholder_fd_t const *list, unsigned int ntot, tain_t const *deadline, tain_t *stamp)
+#include <skalibs/posixishard.h>
+
+int s6_fdholder_setdump (s6_fdholder_t *a, s6_fdholder_fd_t const *list, unsigned int ntot, tain const *deadline, tain *stamp)
{
uint32_t trips ;
if (!ntot) return 1 ;
@@ -27,7 +28,7 @@ int s6_fdholder_setdump (s6_fdholder_t *a, s6_fdholder_fd_t const *list, unsigne
}
{
char pack[5] = "!" ;
- unixmessage_t m = { .s = pack, .len = 5, .fds = 0, .nfds = 0 } ;
+ unixmessage m = { .s = pack, .len = 5, .fds = 0, .nfds = 0 } ;
uint32_pack_big(pack+1, ntot) ;
if (!unixmessage_put(&a->connection.out, &m)) return 0 ;
if (!unixmessage_sender_timed_flush(&a->connection.out, deadline, stamp)) return 0 ;
@@ -45,7 +46,7 @@ int s6_fdholder_setdump (s6_fdholder_t *a, s6_fdholder_fd_t const *list, unsigne
unsigned int j = 0 ;
struct iovec v[1 + (n<<1)] ;
int fds[n] ;
- unixmessage_v_t m = { .v = v, .vlen = 1 + (n<<1), .fds = fds, .nfds = n } ;
+ unixmessagev m = { .v = v, .vlen = 1 + (n<<1), .fds = fds, .nfds = n } ;
char pack[n * (TAIN_PACK+1)] ;
v[0].iov_base = "." ; v[0].iov_len = 1 ;
for (; j < n ; j++, list++, ntot--)
@@ -63,7 +64,7 @@ int s6_fdholder_setdump (s6_fdholder_t *a, s6_fdholder_fd_t const *list, unsigne
}
if (!unixmessage_sender_timed_flush(&a->connection.out, deadline, stamp)) return 0 ;
{
- unixmessage_t m ;
+ unixmessage m ;
if (sanitize_read(unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) < 0) return 0 ;
if (m.len != 1 || m.nfds)
{