From f6904f0a3ba4bd27f3b9cc64df4fe92708314199 Mon Sep 17 00:00:00 2001 From: fdopen Date: Thu, 7 Jan 2021 12:13:36 +0100 Subject: [PATCH] fix NOT_AVAILABLE stub code for Lwt_unix.send_msgto --- src/unix/lwt_unix.h | 5 +++++ src/unix/windows_c/windows_not_available.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/unix/lwt_unix.h b/src/unix/lwt_unix.h index 70c7166904..df74ebaf4a 100644 --- a/src/unix/lwt_unix.h +++ b/src/unix/lwt_unix.h @@ -46,6 +46,11 @@ char *lwt_unix_strdup(char *string); /* Raise [Lwt_unix.Not_available]. */ void lwt_unix_not_available(char const *feature) Noreturn; +#define LWT_NOT_AVAILABLE_BYTE(prim) \ + CAMLprim value lwt_##prim(value *a1, int a2) \ + { \ + lwt_unix_not_available(#prim); \ + } #define LWT_NOT_AVAILABLE1(prim) \ CAMLprim value lwt_##prim(value a1) { lwt_unix_not_available(#prim); } #define LWT_NOT_AVAILABLE2(prim) \ diff --git a/src/unix/windows_c/windows_not_available.c b/src/unix/windows_c/windows_not_available.c index d23af97f7f..a07cba8b44 100644 --- a/src/unix/windows_c/windows_not_available.c +++ b/src/unix/windows_c/windows_not_available.c @@ -25,11 +25,11 @@ LWT_NOT_AVAILABLE5(unix_bytes_send) LWT_NOT_AVAILABLE5(unix_recvfrom) LWT_NOT_AVAILABLE5(unix_bytes_recvfrom) LWT_NOT_AVAILABLE6(unix_sendto) -LWT_NOT_AVAILABLE6(unix_sendto_byte) +LWT_NOT_AVAILABLE_BYTE(unix_sendto_byte) LWT_NOT_AVAILABLE6(unix_bytes_sendto) -LWT_NOT_AVAILABLE6(unix_bytes_sendto_byte) +LWT_NOT_AVAILABLE_BYTE(unix_bytes_sendto_byte) LWT_NOT_AVAILABLE3(unix_recv_msg) -LWT_NOT_AVAILABLE3(unix_send_msg) +LWT_NOT_AVAILABLE6(unix_send_msg) LWT_NOT_AVAILABLE1(unix_get_credentials) LWT_NOT_AVAILABLE2(unix_mcast_set_loop) LWT_NOT_AVAILABLE2(unix_mcast_set_ttl) @@ -76,4 +76,5 @@ LWT_NOT_AVAILABLE2(unix_bind_job) LWT_NOT_AVAILABLE1(unix_getcwd_job) LWT_NOT_AVAILABLE1(unix_tcgetattr_job) LWT_NOT_AVAILABLE3(unix_tcsetattr_job) +LWT_NOT_AVAILABLE_BYTE(unix_send_msg_byte) #endif