File 0156-Fix-incompatible-pointer-types.patch of Package erlang
From 20adf00f3f0f91dbce620ea3664722bd5376bcf7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Henrique=20Ferreira=20de=20Freitas?=
<joaohf@gmail.com>
Date: Fri, 7 Jun 2024 21:36:55 -0300
Subject: [PATCH 1/3] Fix incompatible-pointer-types
With GCC 14 series, the following error exists:
fp_drv.c: In function 'control':
fp_drv.c:126:48: error: passing argument 2 of 'erl_drv_thread_join' from
incompatible pointer type [-Wincompatible-pointer-types]
126 | else if (0 != erl_drv_thread_join(tid, &res_str))
| ^~~~~~~~
| |
| char **
In file included from fp_drv.c:43:
/build/tmp/work/core2-64-poky-linux/erlang/27.0/git/erts/emulator/beam/erl_driver.h:487:50:
note: expected 'void **' but argument is of type 'char **'
487 | EXTERN int erl_drv_thread_join(ErlDrvTid, void **respp);
| ~~~~~~~^~~~~
---
erts/emulator/test/float_SUITE_data/fp_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/erts/emulator/test/float_SUITE_data/fp_drv.c b/erts/emulator/test/float_SUITE_data/fp_drv.c
index a91d622040..f10d39412a 100644
--- a/erts/emulator/test/float_SUITE_data/fp_drv.c
+++ b/erts/emulator/test/float_SUITE_data/fp_drv.c
@@ -123,7 +123,7 @@ static ErlDrvSSizeT control(ErlDrvData drv_data,
res_str = "skip: no thread support";
else if (0 != erl_drv_thread_create("test", &tid, do_test, NULL, NULL))
res_str = "failed to create thread";
- else if (0 != erl_drv_thread_join(tid, &res_str))
+ else if (0 != erl_drv_thread_join(tid, (void**)&res_str))
res_str = "failed to join thread";
break;
}
--
2.35.3