]> granicus.if.org Git - strace/commitdiff
tests/epoll_pwait.c: fix for x32
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 10 May 2016 01:10:51 +0000 (01:10 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 10 May 2016 01:37:46 +0000 (01:37 +0000)
* tests/epoll_pwait.c (main): Explicitly cast last syscall argument
to kernel_ulong_t.

tests/epoll_pwait.c

index a307e849c2e9c34383da801061d5dbf7ebcffb9f..acd4218c8e324c5582923f02fca1df9a77f4da23 100644 (file)
@@ -8,13 +8,16 @@
 # include <sys/epoll.h>
 # include <unistd.h>
 
+# include "kernel_types.h"
+
 int
 main(void)
 {
        sigset_t set[2];
        struct epoll_event *const ev = tail_alloc(sizeof(*ev));
 
-       long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2, set, sizeof(set));
+       long rc = syscall(__NR_epoll_pwait, -1, ev, 1, -2,
+                         set, (kernel_ulong_t) sizeof(set));
        printf("epoll_pwait(-1, %p, 1, -2, %p, %u) = %ld %s (%m)\n",
               ev, set, (unsigned) sizeof(set), rc, errno2name());