diff options
Diffstat (limited to 'meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch')
-rw-r--r-- | meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch b/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch new file mode 100644 index 0000000000..7bf02ea536 --- /dev/null +++ b/meta/recipes-core/ifupdown/files/0001-Define-FNM_EXTMATCH-for-musl.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From ff714d6461569d69b253089110ec659e4ebec248 Mon Sep 17 00:00:00 2001 | ||
2 | From: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> | ||
3 | Date: Tue, 2 Jul 2019 20:10:42 +0200 | ||
4 | Subject: [PATCH] Define FNM_EXTMATCH for musl | ||
5 | |||
6 | Fixes the following compilation errors with musl that does not have | ||
7 | FNM_EXTMATCH defined: | ||
8 | |||
9 | | main.c: In function 'expand_matches': | ||
10 | | main.c:700:40: error: 'FNM_EXTMATCH' undeclared (first use in this | ||
11 | function); did you mean 'FNM_NOMATCH'? | ||
12 | | 700 | if(fnmatch(pattern, ifa->ifa_name, FNM_EXTMATCH)) | ||
13 | | | ^~~~~~~~~~~~ | ||
14 | | | FNM_NOMATCH | ||
15 | |||
16 | and | ||
17 | |||
18 | | archlinux.c:40:28: error: 'FNM_EXTMATCH' undeclared (first use in this | ||
19 | function); did you mean 'FNM_NOMATCH'? | ||
20 | | 40 | if(fnmatch(pattern, buf, FNM_EXTMATCH) == 0) { | ||
21 | | | ^~~~~~~~~~~~ | ||
22 | | | FNM_NOMATCH | ||
23 | |||
24 | Upstream-Status: Submitted [https://salsa.debian.org/debian/ifupdown/merge_requests/5] | ||
25 | |||
26 | Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com> | ||
27 | --- | ||
28 | archcommon.h | 4 ++++ | ||
29 | 1 file changed, 4 insertions(+) | ||
30 | |||
31 | diff --git a/archcommon.h b/archcommon.h | ||
32 | index fe99950..f257f9d 100644 | ||
33 | --- a/archcommon.h | ||
34 | +++ b/archcommon.h | ||
35 | @@ -1,5 +1,9 @@ | ||
36 | #include "header.h" | ||
37 | |||
38 | +#if !defined(FNM_EXTMATCH) | ||
39 | +#define FNM_EXTMATCH 0 | ||
40 | +#endif | ||
41 | + | ||
42 | bool execable(const char *); | ||
43 | |||
44 | #define iface_is_link() (!_iface_has(ifd->real_iface, ":.")) | ||
45 | -- | ||
46 | 2.17.1 | ||
47 | |||