diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-14 20:12:21 +0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-15 05:24:19 +0800 |
commit | 335ba9b6c1db7030264de7d9e38047f645326e54 (patch) | |
tree | 685db365cd22f38549c734ab2bc72c121ae9b784 /sysdeps | |
parent | 65817569adf011b66d197c773df2d9337da5adb3 (diff) | |
download | glibc-335ba9b6c1db7030264de7d9e38047f645326e54.zip glibc-335ba9b6c1db7030264de7d9e38047f645326e54.tar.gz glibc-335ba9b6c1db7030264de7d9e38047f645326e54.tar.bz2 |
Return EXIT_UNSUPPORTED if __builtin_add_overflow unavailable
Since GCC 4.9 doesn't have __builtin_add_overflow:
In file included from tst-stringtable.c:180:0:
stringtable.c: In function ‘stringtable_finalize’:
stringtable.c:185:7: error: implicit declaration of function ‘__builtin_add_overflow’ [-Werror=implicit-function-declaration]
else if (__builtin_add_overflow (previous->offset,
^
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>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/tst-getdents64.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/tst-getdents64.c b/sysdeps/unix/sysv/linux/tst-getdents64.c index 3dd22a4..ba66d49 100644 --- a/sysdeps/unix/sysv/linux/tst-getdents64.c +++ b/sysdeps/unix/sysv/linux/tst-getdents64.c @@ -30,6 +30,7 @@ #include <sys/mman.h> #include <unistd.h> +#if __GNUC_PREREQ (5, 0) /* Called by large_buffer_checks below. */ static void large_buffer_check (int fd, char *large_buffer, size_t large_buffer_size) @@ -85,6 +86,12 @@ do_test_large_size (void) xclose (fd); } +#else +static void +do_test_large_size (void) +{ +} +#endif static void do_test_by_size (size_t buffer_size) |