diff options
Diffstat (limited to 'meta/recipes-support/p11-kit/files/strerror-2.patch')
-rw-r--r-- | meta/recipes-support/p11-kit/files/strerror-2.patch | 30 |
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 @@ | |||
1 | From 7aa6251bf4ce36d027d53c9c96bb05f90ef7eb5b Mon Sep 17 00:00:00 2001 | ||
2 | From: Adam Sampson <ats@offog.org> | ||
3 | Date: Sun, 2 Jul 2023 15:44:06 +0100 | ||
4 | Subject: [PATCH] Define _GNU_SOURCE when testing for strerror_r | ||
5 | |||
6 | The Meson check for GNU/XSI strerror_r didn't inherit the project | ||
7 | options that include _GNU_SOURCE (unlike the autoconf version), so the | ||
8 | result didn't match how the code that uses it will be compiled. Add | ||
9 | _GNU_SOURCE explicitly as with the following checks. | ||
10 | |||
11 | Signed-off-by: Adam Sampson <ats@offog.org> | ||
12 | |||
13 | Upstream-Status: Backport | ||
14 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
15 | --- | ||
16 | meson.build | 1 + | ||
17 | 1 file changed, 1 insertion(+) | ||
18 | |||
19 | diff --git a/meson.build b/meson.build | ||
20 | index 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 | |||