This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Use __syscall_ulong_t in pselect.c
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 17 May 2012 13:50:40 -0700
- Subject: Re: PATCH: Use __syscall_ulong_t in pselect.c
- References: <20120517122708.GA32109@intel.com>
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
On Thu, May 17, 2012 at 05:27:08AM -0700, H.J. Lu wrote:
> Hi,
>
> X32 uses the same pselect6 system call as x86-64. This patch replaces
> size_t with __syscall_ulong_t in pselect.c. Tested on Linux/x32. OK
> to install?
>
> Thanks.
This isn't enough. We also need __syscall_ulong_t on pointer. OK
to install?
Thanks.
H.J.
---
* sysdeps/unix/sysv/linux/pselect.c (data): Use __syscall_ulong_t
on both fields and cast pointer to __syscall_ulong_t.
diff --git a/sysdeps/unix/sysv/linux/pselect.c b/sysdeps/unix/sysv/linux/pselect.c
index 8864d78..11aa7d1 100644
--- a/sysdeps/unix/sysv/linux/pselect.c
+++ b/sysdeps/unix/sysv/linux/pselect.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
@@ -52,11 +52,11 @@ __pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
be created. */
struct
{
- const sigset_t *ss;
- size_t ss_len;
+ __syscall_ulong_t ss;
+ __syscall_ulong_t ss_len;
} data;
- data.ss = sigmask;
+ data.ss = (__syscall_ulong_t) (uintptr_t) sigmask;
data.ss_len = _NSIG / 8;
int result;