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