summaryrefslogtreecommitdiff
path: root/lib/fnmatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fnmatch.c')
-rw-r--r--lib/fnmatch.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index 90134bd113..3a63f355cc 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -65,6 +65,14 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
#include "flexmember.h"
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */
#define NO_LEADING_PERIOD(flags) \
((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD))