Skip to content

Instantly share code, notes, and snippets.

@toots
Created December 1, 2019 16:46
Show Gist options
  • Save toots/cf3c992d554bcb5c5f06a06755c8fc21 to your computer and use it in GitHub Desktop.
Save toots/cf3c992d554bcb5c5f06a06755c8fc21 to your computer and use it in GitHub Desktop.
open Ctypes
module Def (F : Cstubs.FOREIGN) = struct
open F
module Types = Sys_socket_types.Def(Sys_socket_generated_types)
open Types
let getnameinfo = foreign "getnameinfo" (ptr sockaddr_t @-> socklen_t @-> ptr char @-> socklen_t @-> ptr char @-> socklen_t @-> int @-> (returning int))
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment