]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
posix: Fix regex_internal.h on bootstrap
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 20 Jan 2021 12:55:17 +0000 (12:55 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 20 Jan 2021 12:59:34 +0000 (09:59 -0300)
Only define FALLTHROUGH for _LIBC and do not check __clang_major__
value.

It partially syncs with gnulib 5c52f00c69f39fe.

Checked with build-many-glibcs.py for aarch64-linux-gnu,
x86_64-linux-gnu, and s390x-linux-gnu.

posix/regex_internal.h

index e31ac926742ce64db278cac6c3142b1e6586d05f..011f73317675f7acbc06cf078230fd3bfaa6ef99 100644 (file)
@@ -848,12 +848,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
 }
 #endif /* RE_ENABLE_I18N */
 
-#ifndef FALLTHROUGH
-# if (__GNUC__ >= 7) || (__clang_major__ >= 10)
+#ifdef _LIBC
+# if __GNUC__ >= 7
 #  define FALLTHROUGH __attribute__ ((__fallthrough__))
 # else
 #  define FALLTHROUGH ((void) 0)
 # endif
+#else
+# include "attribute.h"
 #endif
 
 #endif /*  _REGEX_INTERNAL_H */