Package: uid-wrapper
Version: 1.3.1-2
Tags: patch ftbfs x32
Usertags: time-t

the attached patch fixes the FTBFS for uid-wrapper on x32:
[  ERROR   ] --- 0xffffffffffffffff != 0x226e57
[   LINE   ] --- ./tests/test_syscall.c:34: error: Failure!
[  FAILED  ] test_uwrap_syscall

The problem is, that the x32 syscall numbers (which start at 0x40000000)
conflicts with the current __FAKE_SOCKET_WRAPPER_SYSCALL_NO (which is
below the syscall entry number from x32).

Helge
diff -up ./tests/uwrap_fake_socket_wrapper.h.org ./tests/uwrap_fake_socket_wrapper.h
--- ./tests/uwrap_fake_socket_wrapper.h.org	2024-11-06 20:47:54.204000021 +0000
+++ ./tests/uwrap_fake_socket_wrapper.h	2024-11-06 20:55:24.569711381 +0000
@@ -1,7 +1,9 @@
 #include <stdbool.h>
 
 /* simulate socket_wrapper hooks */
-#define __FAKE_SOCKET_WRAPPER_SYSCALL_NO 123456789
+/* Use fake number higher than x32 architecture syscalls which
+ * start at __X32_SYSCALL_BIT (0x40000000) */
+#define __FAKE_SOCKET_WRAPPER_SYSCALL_NO 0x4f000000
 #define __FAKE_SOCKET_WRAPPER_SYSCALL_RC 987654321
 bool socket_wrapper_syscall_valid(long int sysno);
 long int socket_wrapper_syscall_va(long int sysno, va_list va);

Reply via email to