aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2021-05-06 17:24:04 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2021-05-06 17:24:04 -0400
commite8c765c55ca00a484c69c3e7a6150bff975a06a8 (patch)
treeaf22280149b689ed04d59a4022fd83f181a7db6b
parent008ebd1262268cf1c9a4bbdc0bf78d5c11cd5b1d (diff)
downloadcleanpath-e8c765c55ca00a484c69c3e7a6150bff975a06a8.tar.gz
Disable regex on windows
-rw-r--r--lib/cleanpath.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/cleanpath.c b/lib/cleanpath.c
index d1c9637..ab6525b 100644
--- a/lib/cleanpath.c
+++ b/lib/cleanpath.c
@@ -62,8 +62,10 @@ struct CleanPath *cleanpath_init(const char *path, const char *sep) {
* @note CLEANPATH_FILTER_EXACT is the default mode
*/
void cleanpath_filter(struct CleanPath *path, unsigned mode, const char *pattern) {
- int match;
+#if !OS_WINDOWS
regex_t regex;
+#endif
+ int match;
for (size_t i = 0; path->part[i]; i++) {
match = 0;