diff --git a/mono-configure-c99.patch b/mono-configure-c99.patch new file mode 100644 index 0000000..0f78563 --- /dev/null +++ b/mono-configure-c99.patch @@ -0,0 +1,76 @@ +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. + +Submitted upstream: + +diff --git a/configure.ac b/configure.ac +index bbbd1622d9728859..5a3a5770c8a3cdb6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2833,14 +2833,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 () { +@@ -2848,8 +2850,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); +--- a/configure 2023-06-14 17:18:48.000000000 +0200 ++++ b/configure 2023-12-09 10:41:58.001084368 +0100 +@@ -24906,14 +24894,16 @@ + __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 () { +@@ -24921,8 +24911,10 @@ + + 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); diff --git a/mono.spec b/mono.spec index 82603fd..0059800 100644 --- a/mono.spec +++ b/mono.spec @@ -24,7 +24,7 @@ %global xamarinrelease 199 Name: mono Version: 6.12.0 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Cross-platform, Open Source, .NET development framework License: MIT @@ -58,6 +58,7 @@ Patch11: 0001-Replace-new-Csharp-features-with-old-ones.patch Patch12: 0001-Reenable-mdoc.exe-build.patch # fix issue with conflicts between i686 and x86_64 package (#1853724) Patch13: mono-6.6.0-fix-multi-arch-issue.patch +Patch14: mono-configure-c99.patch BuildRequires: make BuildRequires: bison @@ -349,6 +350,7 @@ pushd external/api-doc-tools popd %patch -P 12 -p1 %patch -P 13 -p1 +%patch -P 14 -p1 # don't build mono-helix-client which requires the helix-binaries to build sed -i 's|mono-helix-client||g' mcs/tools/Makefile @@ -941,6 +943,9 @@ cert-sync --quiet /etc/pki/tls/certs/ca-bundle.crt %files complete %changelog +* Sat Dec 9 2023 Florian Weimer - 6.12.0-14 +- Fix C compatibility issue in the configure script + * Sat Aug 12 2023 Timotheus Pokorra - 6.12.0-13 - Upgrade to Mono 6.12.0.199