diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 10:46:57 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 10:46:57 +0000 |
commit | 1e0c4ca7448cf41bd38742ae885c9da6f4e48d97 (patch) | |
tree | 3908c0720db2470fefbc4c0824401dbf45862f83 /libc/sysdeps/linux/common/getpgrp.c | |
parent | 7bca85d261904a0a67f2e514b6c4972128561156 (diff) | |
download | uClibc-alpine-1e0c4ca7448cf41bd38742ae885c9da6f4e48d97.tar.bz2 uClibc-alpine-1e0c4ca7448cf41bd38742ae885c9da6f4e48d97.tar.xz |
sync with trunk. Compile tested on i386
Diffstat (limited to 'libc/sysdeps/linux/common/getpgrp.c')
-rw-r--r-- | libc/sysdeps/linux/common/getpgrp.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/getpgrp.c b/libc/sysdeps/linux/common/getpgrp.c index c9de68cd3..5d36ba155 100644 --- a/libc/sysdeps/linux/common/getpgrp.c +++ b/libc/sysdeps/linux/common/getpgrp.c @@ -2,7 +2,7 @@ /* * getpgrp() for uClibc * - * Copyright (C) 2000-2006 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 2000-2008 by Erik Andersen <andersen@codepoet.org> * * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ @@ -13,4 +13,16 @@ #ifdef __NR_getpgrp /* According to the manpage the POSIX.1 version is favoured */ _syscall0(pid_t, getpgrp) +#elif defined __NR_getpgid && (defined __NR_getpid || defined __NR_getxpid) +/* IA64 doesn't have a getpgrp syscall */ +pid_t getpgrp(void) +{ + return getpgid(getpid()); +} +#elif defined __UCLIBC_HAS_STUBS__ +pid_t getpgrp(void) +{ + __set_errno(ENOSYS); + return -1; +} #endif |