summaryrefslogtreecommitdiff
path: root/src/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/macros.h')
-rw-r--r--src/macros.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/macros.h b/src/macros.h
index 280759c..3a13bc9 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -91,4 +91,12 @@
#define __used __attribute__((used))
#endif
+#ifndef __fallthrough
+#if __GNUC__ >= 7
+#define __fallthrough __attribute__((fallthrough))
+#else /* __GNUC__ >= 7 */
+#define __fallthrough
+#endif /* __GNUC__ >= 7 */
+#endif
+
#endif /* _MACROS_H */