summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/p11-kit/files/strerror-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/p11-kit/files/strerror-2.patch')
-rw-r--r--meta/recipes-support/p11-kit/files/strerror-2.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-support/p11-kit/files/strerror-2.patch b/meta/recipes-support/p11-kit/files/strerror-2.patch
new file mode 100644
index 0000000000..1a9180b508
--- /dev/null
+++ b/meta/recipes-support/p11-kit/files/strerror-2.patch
@@ -0,0 +1,30 @@
1From 7aa6251bf4ce36d027d53c9c96bb05f90ef7eb5b Mon Sep 17 00:00:00 2001
2From: Adam Sampson <ats@offog.org>
3Date: Sun, 2 Jul 2023 15:44:06 +0100
4Subject: [PATCH] Define _GNU_SOURCE when testing for strerror_r
5
6The Meson check for GNU/XSI strerror_r didn't inherit the project
7options that include _GNU_SOURCE (unlike the autoconf version), so the
8result didn't match how the code that uses it will be compiled. Add
9_GNU_SOURCE explicitly as with the following checks.
10
11Signed-off-by: Adam Sampson <ats@offog.org>
12
13Upstream-Status: Backport
14Signed-off-by: Ross Burton <ross.burton@arm.com>
15---
16 meson.build | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/meson.build b/meson.build
20index 4cc3f89a..9a72e148 100644
21--- a/meson.build
22+++ b/meson.build
23@@ -301,6 +301,7 @@ endforeach
24
25 if cc.has_function('strerror_r', prefix: '#include <string.h>')
26 strerror_r_code = '''
27+#define _GNU_SOURCE
28 #include <errno.h>
29 #include <string.h>
30