[git commit 0_9_30] - emulate unavailable syscall getpgrp on e.g. ia64 (Stefan Assmann)
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Sat Oct 10 16:44:02 UTC 2009
commit: http://git.uclibc.org/uClibc/commit/?id=f291b1e0979163e233fe1ec48db7f29895c25df2
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0_9_30
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
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 c9de68c..5d36ba1 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 at codepoet.org>
+ * Copyright (C) 2000-2008 by Erik Andersen <andersen at 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
--
1.6.3.3
More information about the uClibc-cvs
mailing list