|
From: Rhys K. <rhy...@so...> - 2020-01-28 08:49:07
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d5e3b38f72b016b8ebc11c1546d4d464e97bc270 commit d5e3b38f72b016b8ebc11c1546d4d464e97bc270 Author: Rhys Kidd <rhy...@gm...> Date: Tue Jan 28 19:33:03 2020 +1100 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 <features.h> // __GLIBC_PREREQ ^ 1 error generated. Fixes: 161d22f0a ("s390x: Fix vector facility (vx) check in test suite") Diff: --- NEWS | 1 + tests/s390x_features.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 6de1db7..d409c13 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 16f9220..baa3493 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -10,7 +10,11 @@ #include <fcntl.h> // open #include <unistd.h> // lseek #include <sys/stat.h> // S_IRUSR + +// <features.h> is a glibc-specific extension, other libc's may not provide it +#ifdef __GLIBC__ #include <features.h> // __GLIBC_PREREQ +#endif // This file determines s390x features a processor supports. // |