From: Rhys Kidd Date: Tue, 28 Jan 2020 08:33:03 +0000 (+1100) Subject: Fix non-glibc build of the test suite with s390x_features X-Git-Tag: VALGRIND_3_16_0~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5e3b38f72b016b8ebc11c1546d4d464e97bc270;p=thirdparty%2Fvalgrind.git Fix non-glibc build of the test suite with s390x_features s390x_features is built unconditionally on a range of platforms, accordingly any non-portable or glibc-specific functionality must be guarded. Fixes error reported when running 'make check' or 'make regtest' on a platform with an alternative libc that Valgrind supports, in this case Apple's libc: s390x_features.c:13:10: fatal error: 'features.h' file not found #include // __GLIBC_PREREQ ^ 1 error generated. Fixes: 161d22f0a ("s390x: Fix vector facility (vx) check in test suite") --- diff --git a/NEWS b/NEWS index 6de1db7cf4..d409c1307a 100644 --- a/NEWS +++ b/NEWS @@ -111,6 +111,7 @@ n-i-bz Fix minor one time leaks in dhat. n-i-bz Add --run-cxx-freeres=no in outer args to avoid inner crashes. n-i-bz Add support for the Linux io_uring system calls n-i-bz sys_statx: don't complain if both |filename| and |buf| are NULL. +n-i-bz Fix non-glibc build of test suite with s390x_features Release 3.15.0 (12 April 2019) diff --git a/tests/s390x_features.c b/tests/s390x_features.c index 16f9220f77..baa349311f 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -10,7 +10,11 @@ #include // open #include // lseek #include // S_IRUSR + +// is a glibc-specific extension, other libc's may not provide it +#ifdef __GLIBC__ #include // __GLIBC_PREREQ +#endif // This file determines s390x features a processor supports. //