Skip to content

Commit

Permalink
Merge pull request #326 from samoht/lwt
Browse files Browse the repository at this point in the history
Update to lwt 3.0.0
  • Loading branch information
samoht authored Aug 1, 2017
2 parents e7a9745 + 7c491f4 commit 22c1379
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.PHONY: build clean test

build:
jbuilder build @install
jbuilder build @install --dev

test:
jbuilder runtest
Expand Down
2 changes: 1 addition & 1 deletion src/stack-unix/icmpv4_socket.ml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ let input t ~src ~dst:_ buf =
let listen _t addr fn =
let fd = Lwt_unix.(socket PF_INET SOCK_DGRAM) ipproto_icmp in
let sa = Lwt_unix.ADDR_INET (Unix.inet_addr_of_string (Ipaddr.V4.to_string addr), port) in
Lwt_unix.Versioned.bind_2 fd sa >>= fun () ->
Lwt_unix.bind fd sa >>= fun () ->
Log.debug (fun f -> f "Bound ICMP file descriptor to %a" pp_sockaddr sa);
let aux fn =
let receive_buffer = Cstruct.create 4096 in
Expand Down
2 changes: 1 addition & 1 deletion src/stack-unix/tcpip_stack_socket.ml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ let listen_tcpv4 _t ~port callback =
let interface = Ipaddr_unix.V4.to_inet_addr Ipaddr.V4.any in
(* FIXME: we should not ignore the result *)
ignore_result (
Lwt_unix.Versioned.bind_2 fd (Lwt_unix.ADDR_INET (interface, port))
Lwt_unix.bind fd (Lwt_unix.ADDR_INET (interface, port))
>>= fun () ->
Lwt_unix.listen fd 10;
let rec loop () =
Expand Down
2 changes: 1 addition & 1 deletion src/stack-unix/udpv4_socket.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let get_udpv4_listening_fd {listen_fds;interface} port =
Lwt.return @@ Hashtbl.find listen_fds (interface,port)
with Not_found ->
let fd = Lwt_unix.(socket PF_INET SOCK_DGRAM 0) in
Lwt_unix.Versioned.bind_2 fd (Lwt_unix.ADDR_INET (interface, port))
Lwt_unix.bind fd (Lwt_unix.ADDR_INET (interface, port))
>>= fun () ->
Hashtbl.add listen_fds (interface, port) fd;
Lwt.return fd
Expand Down
2 changes: 1 addition & 1 deletion src/stack-unix/udpv6_socket.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let get_udpv6_listening_fd {listen_fds;interface} port =
Lwt.return @@ Hashtbl.find listen_fds (interface,port)
with Not_found ->
let fd = Lwt_unix.(socket PF_INET6 SOCK_DGRAM 0) in
Lwt_unix.Versioned.bind_2 fd (Lwt_unix.ADDR_INET (interface,port))
Lwt_unix.bind fd (Lwt_unix.ADDR_INET (interface,port))
>>= fun () ->
Hashtbl.add listen_fds (interface,port) fd;
Lwt.return fd
Expand Down
2 changes: 1 addition & 1 deletion tcpip.opam
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ depends: [
"pcap-format" {test}
"mirage-clock-unix" {test & >= "1.2.0"}
"fmt"
"lwt" {>= "2.7.0"}
"lwt" {>= "3.0.0"}
"logs" {>= "0.6.0"}
"duration"
"io-page-unix"
Expand Down

0 comments on commit 22c1379

Please sign in to comment.