diff options
author | Sam James <sam@gentoo.org> | 2023-12-09 15:27:04 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-12-09 18:05:59 +0000 |
commit | 6b4bcffa3bccaf8ba8c99c65bd9dbd1f445b196d (patch) | |
tree | fc31d5a5511385159b967c2e92ab3cd523ece42e /dev-lang/mono/files | |
parent | dev-python/pymongo: Stabilize 4.6.0 ppc64, #919545 (diff) | |
download | gentoo-6b4bcffa3bccaf8ba8c99c65bd9dbd1f445b196d.tar.gz gentoo-6b4bcffa3bccaf8ba8c99c65bd9dbd1f445b196d.tar.bz2 gentoo-6b4bcffa3bccaf8ba8c99c65bd9dbd1f445b196d.zip |
dev-lang/mono: fix modern C issue in configure
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang/mono/files')
-rw-r--r-- | dev-lang/mono/files/mono-6.12.0.199-configure-c99.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/dev-lang/mono/files/mono-6.12.0.199-configure-c99.patch b/dev-lang/mono/files/mono-6.12.0.199-configure-c99.patch new file mode 100644 index 000000000000..3018dbe8339c --- /dev/null +++ b/dev-lang/mono/files/mono-6.12.0.199-configure-c99.patch @@ -0,0 +1,51 @@ +https://github.com/mono/mono/pull/21730 + +From 90315aa24569d13da93230ac2d3e5ec3c96f35b4 Mon Sep 17 00:00:00 2001 +From: Florian Weimer <fweimer@redhat.com> +Date: Sat, 9 Dec 2023 00:06:09 +0100 +Subject: [PATCH] configure: Fix type errors in __thread test + +The thread start routine must return void *, and int and void * +are distinct types. Compilers increasingly issue errors instead +of warnings for such type errors, and this causes the configure +probe to fail unconditionally, even if the system supports +__thread variables. +--- + configure.ac | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index dbc4904d9b2e4..7518439118e37 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2831,14 +2831,16 @@ if test x$host_win32 = xno; then + __thread int i; + static int res1, res2; + +- void thread_main (void *arg) ++ void *thread_main (void *parg) + { ++ int arg = *(int *)parg; + i = arg; + sleep (1); + if (arg == 1) + res1 = (i == arg); + else + res2 = (i == arg); ++ return NULL; + } + + int main () { +@@ -2846,8 +2848,10 @@ if test x$host_win32 = xno; then + + i = 5; + +- pthread_create (&t1, NULL, thread_main, 1); +- pthread_create (&t2, NULL, thread_main, 2); ++ int one = 1; ++ pthread_create (&t1, NULL, thread_main, &one); ++ int two = 2; ++ pthread_create (&t2, NULL, thread_main, &two); + + pthread_join (t1, NULL); + pthread_join (t2, NULL); |