diff options
Diffstat (limited to 'src/libunixonacid/unixmessage_timed_handle.c')
-rw-r--r-- | src/libunixonacid/unixmessage_timed_handle.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libunixonacid/unixmessage_timed_handle.c b/src/libunixonacid/unixmessage_timed_handle.c index 5ac7ccd..ae10621 100644 --- a/src/libunixonacid/unixmessage_timed_handle.c +++ b/src/libunixonacid/unixmessage_timed_handle.c @@ -1,5 +1,6 @@ /* ISC license. */ +#include <sys/types.h> #include <skalibs/functypes.h> #include <skalibs/tai.h> #include <skalibs/unix-timed.h> @@ -9,7 +10,7 @@ typedef struct unixmessage_handler_blah_s unixmessage_handler_blah_t, *unixmessa struct unixmessage_handler_blah_s { unixmessage_receiver_t *b ; - unixmessage_handler_func_t *f ; + unixmessage_handler_func_t_ref f ; void *p ; } ; @@ -18,13 +19,13 @@ static int getfd (unixmessage_handler_blah_t *blah) return unixmessage_receiver_fd(blah->b) ; } -static int get (unixmessage_handler_blah_t *blah) +static ssize_t get (unixmessage_handler_blah_t *blah) { return unixmessage_handle(blah->b, blah->f, blah->p) ; } -int unixmessage_timed_handle (unixmessage_receiver_t *b, unixmessage_handler_func_t *f, void *p, tain_t const *deadline, tain_t *stamp) +int unixmessage_timed_handle (unixmessage_receiver_t *b, unixmessage_handler_func_t_ref f, void *p, tain_t const *deadline, tain_t *stamp) { unixmessage_handler_blah_t blah = { .b = b, .f = f, .p = p } ; - 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) ; } |