From eb6d9b0db62b5ece00419762e07265f3c3cf521c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Fri, 2 Feb 2024 14:23:42 +0100 Subject: [PATCH] Constify caml_unix_socket_{domain,type}_table in OCaml 5.03 --- src/unix/unix_c/unix_recv_send_utils.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/unix/unix_c/unix_recv_send_utils.h b/src/unix/unix_c/unix_recv_send_utils.h index 97cea4fcc..407091f6e 100644 --- a/src/unix/unix_c/unix_recv_send_utils.h +++ b/src/unix/unix_c/unix_recv_send_utils.h @@ -36,9 +36,15 @@ #define caml_unix_socket_type_table socket_type_table #endif -extern const int msg_flag_table[]; +#if OCAML_VERSION < 50300 extern int caml_unix_socket_domain_table[]; extern int caml_unix_socket_type_table[]; +#else +extern const int caml_unix_socket_domain_table[]; +extern const int caml_unix_socket_type_table[]; +#endif + +extern const int msg_flag_table[]; extern void get_sockaddr(value mladdr, union sock_addr_union *addr /*out*/, socklen_t *addr_len /*out*/); value wrapper_recv_msg(int fd, int n_iovs, struct iovec *iovs);