mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
fix: compat on unix.socket
This commit is contained in:
parent
cd2e0bb0ae
commit
901fa87c3f
1 changed files with 1 additions and 1 deletions
|
|
@ -221,7 +221,7 @@ let run (self:t) : (unit,_) result =
|
||||||
if self.masksigpipe then (
|
if self.masksigpipe then (
|
||||||
ignore (Unix.sigprocmask Unix.SIG_BLOCK [Sys.sigpipe] : _ list);
|
ignore (Unix.sigprocmask Unix.SIG_BLOCK [Sys.sigpipe] : _ list);
|
||||||
);
|
);
|
||||||
let sock = Unix.socket ~cloexec:true PF_INET Unix.SOCK_STREAM 0 in
|
let sock = Unix.socket PF_INET Unix.SOCK_STREAM 0 in
|
||||||
let inet_addr = Unix.inet_addr_of_string self.addr in
|
let inet_addr = Unix.inet_addr_of_string self.addr in
|
||||||
Unix.bind sock (Unix.ADDR_INET (inet_addr, self.port));
|
Unix.bind sock (Unix.ADDR_INET (inet_addr, self.port));
|
||||||
Unix.listen sock 10;
|
Unix.listen sock 10;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue