Module: wine Branch: master Commit: 4ec67b7a6447dfc4af8c03c141c600b41b90ef53 URL: https://source.winehq.org/git/wine.git/?a=commit;h=4ec67b7a6447dfc4af8c03c14...
Author: Piotr Caban piotr@codeweavers.com Date: Mon Apr 25 21:23:38 2022 +0200
ntdll: Use 32-bit time_t when calling __NR_futex syscall.
Signed-off-by: Piotr Caban piotr@codeweavers.com Signed-off-by: Zebediah Figura zfigura@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/unix/sync.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 1695e6ed570..1194ee514b5 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -111,6 +111,17 @@ static int futex_private = 128;
static inline int futex_wait( const int *addr, int val, struct timespec *timeout ) { +#if (defined(__i386__) || defined(__arm__)) && _TIME_BITS==64 + if (timeout && sizeof(*timeout) != 8) + { + struct { + long tv_sec; + long tv_nsec; + } timeout32 = { timeout->tv_sec, timeout->tv_nsec }; + + return syscall( __NR_futex, addr, FUTEX_WAIT | futex_private, val, &timeout32, 0, 0 ); + } +#endif return syscall( __NR_futex, addr, FUTEX_WAIT | futex_private, val, timeout, 0, 0 ); }