1 addapted from https://github.com/aantron/luv/commit/ad7f953fccb8732fe4eb9018556e8d4f82abf8f2
2 diff --git a/src/c/helpers.c b/src/c/helpers.c
3 index 7fcd8b6..bc1b926 100755
6 @@ -175,7 +175,8 @@ static void luv_getaddrinfo_trampoline(
9 static void luv_getnameinfo_trampoline(
10 - uv_getnameinfo_t *c_request, int status, char *hostname, char *service)
11 + uv_getnameinfo_t *c_request, int status, const char *hostname,
12 + const char *service)
14 caml_acquire_runtime_system();
16 @@ -407,7 +408,7 @@ uv_getaddrinfo_cb luv_get_getaddrinfo_trampoline()
17 return luv_getaddrinfo_trampoline;
20 -luv_getnameinfo_cb luv_get_getnameinfo_trampoline()
21 +uv_getnameinfo_cb luv_get_getnameinfo_trampoline()
23 return luv_getnameinfo_trampoline;
25 @@ -613,15 +614,6 @@ int luv_fs_poll_start(
26 return uv_fs_poll_start(handle, (uv_fs_poll_cb)poll_cb, path, interval);
30 - uv_loop_t *loop, uv_getnameinfo_t *req, luv_getnameinfo_cb getnameinfo_cb,
31 - const struct sockaddr *addr, int flags)
35 - loop, req, (uv_getnameinfo_cb)getnameinfo_cb, addr, flags);
39 uv_stream_t *stream, uv_alloc_cb alloc_cb, luv_read_cb read_cb)
41 diff --git a/src/c/helpers.h b/src/c/helpers.h
42 index f73e32f..2cc1200 100755
45 @@ -55,9 +55,6 @@ typedef void (*luv_fs_event_cb)(
46 typedef void (*luv_fs_poll_cb)(
47 uv_fs_poll_t *handle, int status, uv_stat_t *prev, uv_stat_t *curr);
49 -typedef void (*luv_getnameinfo_cb)(
50 - uv_getnameinfo_t *req, int status, char *hostname, char *service);
52 typedef void (*luv_read_cb)(uv_stream_t *stream, ssize_t nread, uv_buf_t *buf);
54 typedef void (*luv_udp_recv_cb)(
55 @@ -78,7 +75,7 @@ uv_fs_cb luv_null_fs_callback_pointer();
56 luv_fs_event_cb luv_get_fs_event_trampoline();
57 luv_fs_poll_cb luv_get_fs_poll_trampoline();
58 uv_getaddrinfo_cb luv_get_getaddrinfo_trampoline();
59 -luv_getnameinfo_cb luv_get_getnameinfo_trampoline();
60 +uv_getnameinfo_cb luv_get_getnameinfo_trampoline();
61 uv_idle_cb luv_get_idle_trampoline();
62 luv_once_cb luv_get_once_trampoline();
63 uv_poll_cb luv_get_poll_trampoline();
64 @@ -173,10 +170,6 @@ int luv_fs_poll_start(
65 uv_fs_poll_t *handle, luv_fs_poll_cb poll_cb, const char *path,
66 unsigned int interval);
69 - uv_loop_t *loop, uv_getnameinfo_t *req, luv_getnameinfo_cb getnameinfo_cb,
70 - const struct sockaddr *addr, int flags);
73 uv_stream_t *stream, uv_alloc_cb alloc_cb, luv_read_cb read_cb);
75 diff --git a/src/c/luv_c_function_descriptions.ml b/src/c/luv_c_function_descriptions.ml
76 index 684a46b..7ac1421 100755
77 --- a/src/c/luv_c_function_descriptions.ml
78 +++ b/src/c/luv_c_function_descriptions.ml
79 @@ -1336,7 +1336,7 @@ struct
80 (void @-> returning trampoline)
83 - foreign "luv_getnameinfo"
84 + foreign "uv_getnameinfo"