diff options
Diffstat (limited to 'otherlibs/unix/listen.c')
-rw-r--r-- | otherlibs/unix/listen.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/otherlibs/unix/listen.c b/otherlibs/unix/listen.c new file mode 100644 index 000000000..d3791a2c4 --- /dev/null +++ b/otherlibs/unix/listen.c @@ -0,0 +1,17 @@ +#include <mlvalues.h> +#include "unix.h" + +#ifdef HAS_SOCKETS + +value unix_listen(sock, backlog) + value sock, backlog; +{ + if (listen(Int_val(sock), Int_val(backlog)) == -1) uerror("listen", Nothing); + return Val_unit; +} + +#else + +value unix_listen() { invalid_argument("listen not implemented"); } + +#endif |