The previous fix for the CI under arm/v7 was incomplete, and actually broke the tests under openSUSE Tumbleweed. Closer examination showed that the issues were caused by Debian's move to 64bit time_t on some 32 bit architectures [1][2]. This effort causes _TIME_BITS=64 to be set by gcc internally, and introduces symbol redirections for libaio [3], on Debian with gcc 13 and newer only. Fix the conditions for symbol remappings in wrap64.h. [1] https://wiki.debian.org/ReleaseGoals/64bit-time [2] https://salsa.debian.org/toolchain-team/gcc/-/commit/d82fb8a8ab7b84f61fb8290a2c3aa2e3f54e7b8a [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1062218 Fixes: 6a7524a ("multipath-tools tests: fix CI failures on arm/v7 with glibc 2.37") Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> Reviewed-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> --- tests/wrap64.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/wrap64.h b/tests/wrap64.h index 7e43420..af6cc2b 100644 --- a/tests/wrap64.h +++ b/tests/wrap64.h @@ -2,6 +2,8 @@ #define _WRAP64_H 1 #include <syscall.h> #include <linux/types.h> +/* The following include is required for LIBAIO_REDIRECT */ +#include <libaio.h> #include "util.h" /* @@ -47,7 +49,8 @@ * fcntl() needs special treatment; fcntl64() has been introduced in 2.28. * https://savannah.gnu.org/forum/forum.php?forum_id=9205 */ -#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 37) && defined(__arm__) && __ARM_ARCH == 7 +#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 34) && __BITS_PER_LONG == 32 \ + && defined(_TIME_BITS) && _TIME_BITS == 64 #define WRAP_FCNTL_NAME __fcntl_time64 #elif defined(__GLIBC__) && __GLIBC_PREREQ(2, 28) #define WRAP_FCNTL_NAME WRAP_NAME(fcntl) @@ -60,7 +63,8 @@ /* * glibc 2.37 uses __ioctl_time64 for ioctl */ -#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 37) && defined(__arm__) && __ARM_ARCH == 7 +#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 34) && __BITS_PER_LONG == 32 \ + && defined(_TIME_BITS) && _TIME_BITS == 64 #define WRAP_IOCTL_NAME __ioctl_time64 #else #define WRAP_IOCTL_NAME ioctl @@ -68,7 +72,8 @@ #define WRAP_IOCTL CONCAT2(__wrap_, WRAP_IOCTL_NAME) #define REAL_IOCTL CONCAT2(__real_, WRAP_IOCTL_NAME) -#if defined(__NR_io_pgetevents) && __BITS_PER_LONG == 32 && defined(_TIME_BITS) && _TIME_BITS == 64 +#if defined(__GLIBC__) && defined(LIBAIO_REDIRECT) && __BITS_PER_LONG == 32 \ + && defined(_TIME_BITS) && _TIME_BITS == 64 #define WRAP_IO_GETEVENTS_NAME io_getevents_time64 #else #define WRAP_IO_GETEVENTS_NAME io_getevents -- 2.45.2