diff options
Diffstat (limited to 'otherlibs/unix/accept.c')
-rw-r--r-- | otherlibs/unix/accept.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/otherlibs/unix/accept.c b/otherlibs/unix/accept.c index 3247c43dc..d2cb598e5 100644 --- a/otherlibs/unix/accept.c +++ b/otherlibs/unix/accept.c @@ -15,6 +15,7 @@ #include <mlvalues.h> #include <alloc.h> +#include <fail.h> #include <memory.h> #include <signals.h> #include "unixsupport.h" @@ -36,7 +37,7 @@ CAMLprim value unix_accept(value sock) retcode = accept(Int_val(sock), &addr.s_gen, &addr_len); leave_blocking_section(); if (retcode == -1) uerror("accept", Nothing); - a = alloc_sockaddr(&addr, addr_len); + a = alloc_sockaddr(&addr, addr_len, retcode); Begin_root (a); res = alloc_small(2, 0); Field(res, 0) = Val_int(retcode); @@ -47,6 +48,7 @@ CAMLprim value unix_accept(value sock) #else -CAMLprim value unix_accept(value sock) { invalid_argument("accept not implemented"); } +CAMLprim value unix_accept(value sock) +{ invalid_argument("accept not implemented"); } #endif |