wok-current view gcc63/stuff/fix-build-with-glibc-2.28.patch @ rev 25685
Add checkspace / fetchall feature for tazpkg
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Mar 14 20:28:39 2024 +0000 (8 months ago) |
parents | |
children |
line source
1 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
2 +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
3 @@ -155,7 +155,6 @@
4 # include <sys/procfs.h>
5 #endif
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 @@ -248,7 +247,19 @@
12 #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
14 #if SANITIZER_LINUX && !SANITIZER_ANDROID
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__)
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 unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
30 unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
31 #endif // SANITIZER_LINUX && !SANITIZER_ANDROID