From 83c1854b97d79e2b67065b1a2651b0d11d8a8f6b Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 2 Mar 2011 15:06:51 +0100 Subject: remove error handling from some syscalls Remove error handling from getegid/getgid/geteuid/getuid/getppid/getpid/getpgrp Use strong_alias if fallbacks are needed Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/common/getpid.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps/linux/common/getpid.c') diff --git a/libc/sysdeps/linux/common/getpid.c b/libc/sysdeps/linux/common/getpid.c index 8041022e7..d9a69084f 100644 --- a/libc/sysdeps/linux/common/getpid.c +++ b/libc/sysdeps/linux/common/getpid.c @@ -10,11 +10,13 @@ #include #include -extern __typeof(getpid) __libc_getpid; -#if defined __NR_getxpid +#ifdef __NR_getxpid +# undef __NR_getpid # define __NR_getpid __NR_getxpid #endif -#define __NR___libc_getpid __NR_getpid -_syscall0(pid_t, __libc_getpid) -weak_alias(__libc_getpid, getpid) + +_syscall_noerr0(pid_t, getpid) libc_hidden_weak(getpid) +#ifndef __NR_getppid +strong_alias(getpid,getppid) +#endif -- cgit v1.2.3