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