diff options
Diffstat (limited to 'src/libunixonacid/timed_get.c')
-rw-r--r-- | src/libunixonacid/timed_get.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libunixonacid/timed_get.c b/src/libunixonacid/timed_get.c index 1b4e420..e93478e 100644 --- a/src/libunixonacid/timed_get.c +++ b/src/libunixonacid/timed_get.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <sys/types.h> #include <errno.h> #include <skalibs/allreadwrite.h> #include <skalibs/functypes.h> @@ -7,10 +8,10 @@ #include <skalibs/iopause.h> #include <skalibs/unix-timed.h> -int timed_get (void *b, initfunc_t *getfd, initfunc_t *get, tain_t const *deadline, tain_t *stamp) +ssize_t timed_get (void *b, initfunc_t_ref getfd, getfunc_t_ref get, tain_t const *deadline, tain_t *stamp) { iopause_fd x = { .fd = (*getfd)(b), .events = IOPAUSE_READ, .revents = 0 } ; - register int r = (*get)(b) ; + ssize_t r = (*get)(b) ; while (!r) { r = iopause_stamp(&x, 1, deadline, stamp) ; |