summaryrefslogtreecommitdiff
path: root/src/libunixonacid/ipc_timed_recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid/ipc_timed_recv.c')
-rw-r--r--src/libunixonacid/ipc_timed_recv.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libunixonacid/ipc_timed_recv.c b/src/libunixonacid/ipc_timed_recv.c
index 7093c4d..acf3d48 100644
--- a/src/libunixonacid/ipc_timed_recv.c
+++ b/src/libunixonacid/ipc_timed_recv.c
@@ -1,5 +1,6 @@
/* ISC license. */
+#include <sys/types.h>
#include <skalibs/functypes.h>
#include <skalibs/tai.h>
#include <skalibs/webipc.h>
@@ -9,7 +10,7 @@ struct blah_s
{
int fd ;
char *s ;
- unsigned int len ;
+ size_t len ;
char *path ;
} ;
@@ -18,13 +19,13 @@ static int getfd (struct blah_s *blah)
return blah->fd ;
}
-static int get (struct blah_s *blah)
+static ssize_t get (struct blah_s *blah)
{
return sanitize_read(ipc_recv(blah->fd, blah->s, blah->len, blah->path)) ;
}
-int ipc_timed_recv (int fd, char *s, unsigned int len, char *path, tain_t const *deadline, tain_t *stamp)
+ssize_t ipc_timed_recv (int fd, char *s, size_t len, char *path, tain_t const *deadline, tain_t *stamp)
{
struct blah_s blah = { .fd = fd, .s = s, .len = len, .path = path } ;
- return timed_get(&blah, (initfunc_t_ref)&getfd, (initfunc_t_ref)&get, deadline, stamp) ;
+ return timed_get(&blah, (initfunc_t_ref)&getfd, (getfunc_t_ref)&get, deadline, stamp) ;
}