diff options
Diffstat (limited to 'src/libs6/s6_fdholder_delete_async.c')
-rw-r--r-- | src/libs6/s6_fdholder_delete_async.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libs6/s6_fdholder_delete_async.c b/src/libs6/s6_fdholder_delete_async.c index 21caab3..e234cfd 100644 --- a/src/libs6/s6_fdholder_delete_async.c +++ b/src/libs6/s6_fdholder_delete_async.c @@ -1,17 +1,16 @@ - /* ISC license. */ +/* ISC license. */ -#include <sys/types.h> +#include <sys/uio.h> +#include <string.h> #include <errno.h> -#include <skalibs/bytestr.h> -#include <skalibs/siovec.h> #include <skalibs/unixmessage.h> #include <s6/s6-fdholder.h> int s6_fdholder_delete_async (s6_fdholder_t *a, char const *id) { - size_t idlen = str_len(id) ; + size_t idlen = strlen(id) ; char pack[2] = "D" ; - siovec_t v[2] = { { .s = pack, .len = 2 }, { .s = (char *)id, .len = idlen + 1 } } ; + struct iovec v[2] = { { .iov_base = pack, .iov_len = 2 }, { .iov_base = (char *)id, .iov_len = idlen + 1 } } ; unixmessage_v_t m = { .v = v, .vlen = 2, .fds = 0, .nfds = 0 } ; if (idlen > S6_FDHOLDER_ID_SIZE) return (errno = ENAMETOOLONG, 0) ; pack[1] = (unsigned char)idlen ; |