wok-current view gcc49/stuff/build_with_glibc-2.28.patch @ rev 25634
Mass update, new toolchain gcc 8.3.0, glibc 2.28.0
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Jan 14 08:12:37 2024 +0000 (20 months ago) |
parents | |
children |
line source
1 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2013-12-19 13:54:11.000000000 +0100
2 +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc 2018-09-16 15:23:46.141733145 +0200
3 @@ -81,7 +81,6 @@
4 #include <sys/statvfs.h>
5 #include <sys/timex.h>
6 #include <sys/user.h>
7 -#include <sys/ustat.h>
8 #include <linux/cyclades.h>
9 #include <linux/if_eql.h>
10 #include <linux/if_plip.h>
11 @@ -163,7 +162,19 @@
12 unsigned struct_old_utsname_sz = sizeof(struct old_utsname);
13 unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname);
14 unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
15 - unsigned struct_ustat_sz = sizeof(struct ustat);
16 + // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
17 + // has been removed from glibc 2.28.
18 +#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
19 + || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
20 + || defined(__x86_64__)
21 +#define SIZEOF_STRUCT_USTAT 32
22 +#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
23 + || defined(__powerpc__) || defined(__s390__) || defined(__sparc__)
24 +#define SIZEOF_STRUCT_USTAT 20
25 +#else
26 +#error Unknown size of struct ustat
27 +#endif
28 + unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
29 #endif // SANITIZER_LINUX
31 #if SANITIZER_LINUX && !SANITIZER_ANDROID