From e678bd4b4289e536e998057bf9a9cf415f21b74c Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sat, 20 Mar 2021 17:35:41 +0100 Subject: Add libcompat fallback implementation for fnmatch This has basically been copied over from Musl and slightly modifed. Signed-off-by: David Oberhollenzer --- include/compat.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/compat.h b/include/compat.h index 111168f..e5785d3 100644 --- a/include/compat.h +++ b/include/compat.h @@ -8,6 +8,7 @@ #define COMPAT_H #include "sqfs/predef.h" +#include "config.h" #if defined(__GNUC__) && __GNUC__ >= 5 # define SZ_ADD_OV __builtin_add_overflow @@ -188,4 +189,15 @@ int getsubopt(char **opt, char *const *keys, char **val); WCHAR *path_to_windows(const char *input); #endif +#ifdef HAVE_FNMATCH +#include +#else +#define FNM_PATHNAME 0x1 + +#define FNM_NOMATCH 1 +#define FNM_NOSYS (-1) + +int fnmatch(const char *, const char *, int); +#endif + #endif /* COMPAT_H */ -- cgit v1.2.3