aboutsummaryrefslogtreecommitdiffstats
path: root/extension/fnmatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'extension/fnmatch.c')
-rw-r--r--extension/fnmatch.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/extension/fnmatch.c b/extension/fnmatch.c
index c63fe136..7f8ab8d7 100644
--- a/extension/fnmatch.c
+++ b/extension/fnmatch.c
@@ -45,9 +45,16 @@
#define _(msgid) gettext(msgid)
#define N_(msgid) msgid
-#ifdef HAVE_FNMATCH_H
#define _GNU_SOURCE 1 /* use GNU extensions if they're there */
+#ifdef HAVE_FNMATCH_H
#include <fnmatch.h>
+#else
+#include "../missing_d/fnmatch.h" /* version that comes with gawk */
+#endif
+
+#ifndef HAVE_FNMATCH
+#include "../missing_d/fnmatch.c" /* ditto */
+#define HAVE_FNMATCH
#endif
/* Provide GNU extensions as no-ops if not defined */