From 1cdbcb7563c9effe5321dc02331fb6aafff2afba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Wed, 5 Jan 2022 14:41:41 +0100 Subject: [PATCH] Fully initialize custom_operations job_ops It was missing an initializer for `.compare_ext` (since 3.12.1), the default is `custom_compare_ext_default`; and `.fixed_length` (since 4.08.0) for which `NULL` is good. --- src/unix/lwt_unix_stubs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/unix/lwt_unix_stubs.c b/src/unix/lwt_unix_stubs.c index 74f7f7246..f842eac07 100644 --- a/src/unix/lwt_unix_stubs.c +++ b/src/unix/lwt_unix_stubs.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -989,7 +990,12 @@ static void *worker_loop(void *data) { /* Description of jobs. */ struct custom_operations job_ops = { "lwt.unix.job", custom_finalize_default, custom_compare_default, - custom_hash_default, custom_serialize_default, custom_deserialize_default}; + custom_hash_default, custom_serialize_default, custom_deserialize_default, + custom_compare_ext_default, +#if OCAML_VERSION >= 40800 + NULL +#endif +}; /* Get the job structure contained in a custom value. */ #define Job_val(v) *(lwt_unix_job *)Data_custom_val(v)