uClibc-0.9.32.1-Fix-__libc_epoll_pwait-compile-failure-on-x86.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 8245f3b4638fdff2011c2657af1bb211def704bc Mon Sep 17 00:00:00 2001
  2. From: Phil Blundell <pb@pbcl.net>
  3. Date: Sat, 11 Jun 2011 01:10:46 -0400
  4. Subject: [PATCH] Fix __libc_epoll_pwait compile failure on x86
  5. This prevents "memory input 7 is not directly addressable" errors.
  6. | libc/sysdeps/linux/common/epoll.c: In function '__libc_epoll_pwait':
  7. | libc/sysdeps/linux/common/epoll.c:71:80: error: memory input 7 is not directly addressable
  8. | libc/sysdeps/linux/common/epoll.c:75:86: error: memory input 7 is not directly addressable
  9. | make: *** [libc/sysdeps/linux/common/epoll.o] Error 1
  10. | make: *** Waiting for unfinished jobs....
  11. Signed-off-by: Phil Blundell <pb@pbcl.net>
  12. Signed-off-by: Jason Woodward <jason.woodward@timesys.com>
  13. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  14. ---
  15. libc/sysdeps/linux/common/epoll.c | 5 +++--
  16. 1 files changed, 3 insertions(+), 2 deletions(-)
  17. diff --git a/libc/sysdeps/linux/common/epoll.c b/libc/sysdeps/linux/common/epoll.c
  18. index 85b0cfd..ab3e73b 100644
  19. --- a/libc/sysdeps/linux/common/epoll.c
  20. +++ b/libc/sysdeps/linux/common/epoll.c
  21. @@ -67,12 +67,13 @@ extern __typeof(epoll_pwait) __libc_epoll_pwait;
  22. int __libc_epoll_pwait(int epfd, struct epoll_event *events, int maxevents,
  23. int timeout, const sigset_t *set)
  24. {
  25. + int nsig = _NSIG / 8;
  26. if (SINGLE_THREAD_P)
  27. - return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8);
  28. + return INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
  29. # ifdef __UCLIBC_HAS_THREADS_NATIVE__
  30. else {
  31. int oldtype = LIBC_CANCEL_ASYNC ();
  32. - int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, _NSIG / 8);
  33. + int result = INLINE_SYSCALL(epoll_pwait, 6, epfd, events, maxevents, timeout, set, nsig);
  34. LIBC_CANCEL_RESET (oldtype);
  35. return result;
  36. }
  37. --
  38. 1.7.5.4