Jeff Bailey
2006-Apr-22 08:52 UTC
[klibc] ia64 build failure - no fork or ppoll syscalls in 2.6.16
klibc fails to build on ia64 because it has neither fork nor the ppoll syscalls. This patch marks the former in SYSCALLS.def, and puts a guard wrapper around the ppoll definition in ppoll.c Should these calls return ENOSYS rather than simply not existing on some systems? If yes, please apply this and I'll follow up with a patch shortly that does ENOSYS for this and pselect at least. Signed-off-by: Jeff Bailey <jbailey@ubuntu.com> --- klibc-1.3.7.orig/klibc/ppoll.c +++ klibc-1.3.7/klibc/ppoll.c @@ -3,6 +3,9 @@ */ #include <sys/poll.h> +#include <sys/syscall.h> + +#if defined(__NR_ppoll) __extern int __ppoll(struct pollfd *, nfds_t, struct timespec *, const sigset_t *, size_t); @@ -12,3 +15,5 @@ { return __ppoll(ufds, nfds, timeout, sigmask, sizeof *sigmask); } + +#endif --- klibc-1.3.7.orig/klibc/SYSCALLS.def +++ klibc-1.3.7/klibc/SYSCALLS.def @@ -21,7 +21,7 @@ <?!ia64> pid_t clone::__clone(unsigned long, void *) <?ia64> pid_t clone::__clone2(unsigned long, void *, void *) # if ! _KLIBC_NO_MMU -<!sparc> pid_t fork() +<!sparc,ia64> pid_t fork() <sparc> pid_t fork@forkish() #endif #if _KLIBC_REAL_VFORK -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?Url : http://www.zytor.com/pipermail/klibc/attachments/20060422/ff8ca974/attachment.bin
H. Peter Anvin
2006-Apr-22 09:48 UTC
[klibc] ia64 build failure - no fork or ppoll syscalls in 2.6.16
Jeff Bailey wrote:> klibc fails to build on ia64 because it has neither fork nor the ppoll > syscalls. This patch marks the former in SYSCALLS.def, and puts a guard > wrapper around the ppoll definition in ppoll.c > > Should these calls return ENOSYS rather than simply not existing on some > systems? If yes, please apply this and I'll follow up with a patch > shortly that does ENOSYS for this and pselect at least.fork is a miss on my part, of course; IA64 has a way to fork, it's just weird. Why doesn't IA64 have pselect/ppoll? (And no, having them exist but returning ENOSYS is the absolutely worst thing you could do.) -hpa
Maybe Matching Threads
- [klibc:time64] select: Make all select calls wrappers for pselect6()
- [PATCH 2/3] syscalls: Add syscalls needed by arm64
- [nbdkit PATCH] Experiment: nbd: Use ppoll() instead of pipe-to-self
- [klibc:master] syscalls: Add syscalls needed by arm64
- [nbdkit PATCH 0/3] More responsive shutdown