Florian Weimer 2022-12-12 19:44:40 +01:00
parent 1770b98d87
commit b90c845b4f
2 changed files with 36 additions and 0 deletions

35
p11-kit-meson-c99.patch Normal file
View File

@ -0,0 +1,35 @@
Port meson build script to C99. The _Thread_local check used
an implicit int. Future compilers are likely to reject missing
int types by default.
Patch configure.ac as well, although it is not used by the current
Fedora build.
Submitted upstream: <https://github.com/p11-glue/p11-kit/pull/451>
diff --git a/configure.ac b/configure.ac
index be3af55093874750..fc719c78c99c2ac3 100644
--- 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
diff --git a/meson.build b/meson.build
index 64bb3429aef1bb79..aaa3c1f50b5b943f 100644
--- 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;
}
'''

View File

@ -11,6 +11,7 @@ Source1: https://github.com/p11-glue/p11-kit/releases/download/%{version}
Source2: gpgkey-462225C3B46F34879FC8496CD605848ED7E69871.gpg
Source3: trust-extract-compat
Source4: p11-kit-client.service
Patch0: p11-kit-meson-c99.patch
BuildRequires: gcc
BuildRequires: libtasn1-devel >= 2.3