Skip to content

Commit

Permalink
Merge pull request mirage#506 from hannesm/fix-cstruct-deprecation
Browse files Browse the repository at this point in the history
use Cstruct.to_string instead of deprecated Cstruct.copy
  • Loading branch information
hannesm authored Mar 17, 2023
2 parents cc066be + 71ee725 commit cc0cbc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tcp/options.ml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ let unmarshal buf =
(* Parse apparently well-formed but unrecognized
options *)
| n, _ ->
Ok (Unknown (n, Cstruct.copy buf 2 (Cstruct.length buf - 2)))
Ok (Unknown (n, Cstruct.to_string ~off:2 buf))
end
) buf in
Result.map List.rev
Expand Down
3 changes: 2 additions & 1 deletion tcpip.opam
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ depends: [
"arp" {>= "3.0.0"}
"mirage-flow" {>= "2.0.0"}
"mirage-vnetif" {with-test & >= "0.5.0"}
"alcotest" {with-test & >="0.7.0"}
"alcotest" {with-test & >="1.5.0"}
"pcap-format" {with-test}
"mirage-clock-unix" {with-test & >= "3.0.0"}
"mirage-random-test" {with-test & >= "0.1.0"}
"ipaddr-cstruct" {with-test}
"lru" {>= "0.3.0"}
"metrics"
"cmdliner" {>= "1.1.0"}
]
depopts: [
"ocaml-freestanding"
Expand Down

0 comments on commit cc0cbc7

Please sign in to comment.