aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreasyaspi314 (Devin) <easyaspi314@users.noreply.github.com>2021-12-13 15:08:50 -0500
committerMatteo Croce <teknoraver@meta.com>2025-04-07 15:09:08 +0200
commit0d205e5cf327e4b5d6946ca4a09ae65d2c4c194e (patch)
tree8c47c27d9c8cbdaedce4c63b03b006d290831ebf
parent8aae9e2d2d4bb6392a62857881a82d59380c59cf (diff)
downloadutil-linux-0d205e5cf327e4b5d6946ca4a09ae65d2c4c194e.tar.gz
Fix XXH_HAS_C_ATTRIBUTE check
-rw-r--r--include/xxhash.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/xxhash.h b/include/xxhash.h
index fbd1aab9ac..c17521f99f 100644
--- a/include/xxhash.h
+++ b/include/xxhash.h
@@ -631,14 +631,12 @@ introduced in CPP17 and C23.
CPP17 : https://en.cppreference.com/w/cpp/language/attributes/fallthrough
C23 : https://en.cppreference.com/w/c/language/attributes/fallthrough
*/
-#if XXH_HAS_C_ATTRIBUTE(x)
-# define XXH_FALLTHROUGH [[fallthrough]]
-#elif XXH_HAS_CPP_ATTRIBUTE(x)
+#if XXH_HAS_C_ATTRIBUTE(fallthrough) || XXH_HAS_CPP_ATTRIBUTE(fallthrough)
# define XXH_FALLTHROUGH [[fallthrough]]
#elif XXH_HAS_ATTRIBUTE(__fallthrough__)
-# define XXH_FALLTHROUGH __attribute__ ((fallthrough))
+# define XXH_FALLTHROUGH __attribute__ ((__fallthrough__))
#else
-# define XXH_FALLTHROUGH
+# define XXH_FALLTHROUGH /* fallthrough */
#endif
/*!