mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-08 14:20:07 +00:00
nptl: Prefer setresuid32 in tst-setuid2
Use the setresuid32 system call if it is available, prefering it over setresuid. If both system calls exist, setresuid is the 16-bit variant. This fixes a build failure on sparcv9-linux-gnu.
This commit is contained in:
parent
2abfa19072
commit
da29dc24d4
@ -76,7 +76,12 @@ run_on_thread (void (*func) (void))
|
|||||||
static void
|
static void
|
||||||
change_thread_ids (void)
|
change_thread_ids (void)
|
||||||
{
|
{
|
||||||
|
#ifdef __NR_setresuid32
|
||||||
|
/* Prefer 32-bit setresuid32 over 16-bit setresuid. */
|
||||||
|
long ret = syscall (__NR_setresuid32, 2001, 2002, 2003);
|
||||||
|
#else
|
||||||
long ret = syscall (__NR_setresuid, 2001, 2002, 2003);
|
long ret = syscall (__NR_setresuid, 2001, 2002, 2003);
|
||||||
|
#endif
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
FAIL ("setresuid (2001, 2002, 2003): %ld", ret);
|
FAIL ("setresuid (2001, 2002, 2003): %ld", ret);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user