You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-crypt/p11-kit/files/p11-kit-0.24.1-configure-cl...

36 lines
1.0 KiB

https://github.com/p11-glue/p11-kit/commit/d39043f7c6e44247b5b1a237888e80b2a4d9c2b2
From d39043f7c6e44247b5b1a237888e80b2a4d9c2b2 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Mon, 12 Dec 2022 19:40:25 +0100
Subject: [PATCH] Fix meson/configure _Thread_local checks for C99
compatibility
The type was missing from the definition, which happens to work
in current compilers for historic reasons. Implicit ints were
actually removed from C in 1999.
--- a/configure.ac
+++ b/configure.ac
@@ -148,7 +148,7 @@ if test "$os_unix" = "yes"; then
[ac_cv_tls_keyword=
for keyword in _Thread_local __thread; do
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>]],
- [[static ]$keyword[ foo;]])],
+ [[static ]$keyword[ int foo;]])],
[ac_cv_tls_keyword=$keyword])
done])
if test -n "$ac_cv_tls_keyword"; then
--- a/meson.build
+++ b/meson.build
@@ -200,7 +200,7 @@ if host_system != 'windows'
tls_test_code_template = '''
#include <stdlib.h>
int main (void) {
-static @0@ foo;
+static @0@ int foo;
return 0;
}
'''