diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-13 05:59:59 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-14 19:26:00 +0800 |
commit | 1d40170dd367831b97cbdb89ad1b7241a241923b (patch) | |
tree | edc86a67b78033e25a6d24708b067758bc36db1d | |
parent | 1a41fc44daa03346b7bae5bd12a281116275d836 (diff) | |
download | glibc-1d40170dd367831b97cbdb89ad1b7241a241923b.zip glibc-1d40170dd367831b97cbdb89ad1b7241a241923b.tar.gz glibc-1d40170dd367831b97cbdb89ad1b7241a241923b.tar.bz2 |
Return EXIT_UNSUPPORTED if __builtin_mul_overflow unavailable
Since GCC 4.9 doesn't support __builtin_mul_overflow:
tst-fd_to_filename.c: In function ‘check_ranges’:
tst-fd_to_filename.c:51:3: error: implicit declaration of function ‘__builtin_mul_overflow’ [-Werror=implicit-function-declaration]
while (!__builtin_mul_overflow (power, base, &power));
^
cc1: all warnings being treated as errors
return EXIT_UNSUPPORTED for GCC 4.9 or older.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
-rw-r--r-- | misc/tst-fd_to_filename.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/misc/tst-fd_to_filename.c b/misc/tst-fd_to_filename.c index acbba69..37b3103 100644 --- a/misc/tst-fd_to_filename.c +++ b/misc/tst-fd_to_filename.c @@ -17,6 +17,7 @@ <https://www.gnu.org/licenses/>. */ #include <fcntl.h> +#if __GNUC_PREREQ (5, 0) #include <fd_to_filename.h> #include <stdio.h> #include <support/check.h> @@ -99,3 +100,12 @@ do_test (void) } #include <support/test-driver.c> +#else +#include <support/test-driver.h> + +int +main (void) +{ + return EXIT_UNSUPPORTED; +} +#endif |