615-mips_fix_sigev_pad_size.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. commit b97b4b698b023f75b54f987859c856ab4861ea00
  2. Author: Vicente Olivert Riera <[email protected]>
  3. Date: Thu Jan 2 15:02:12 2014 +0000
  4. siginfo.h: __SIGEV_PAD_SIZE takes __WORDSIZE into account
  5. Make __SIGEV_PAD_SIZE to take __WORDSIZE into account for alpha, mips
  6. and ia64 arches.
  7. Signed-off-by: Vicente Olivert Riera <[email protected]>
  8. Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
  9. --- a/libc/sysdeps/linux/alpha/bits/siginfo.h
  10. +++ b/libc/sysdeps/linux/alpha/bits/siginfo.h
  11. @@ -258,7 +258,11 @@ enum
  12. /* Structure to transport application-defined values with signals. */
  13. # define __SIGEV_MAX_SIZE 64
  14. -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  15. +# if __WORDSIZE == 64
  16. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  17. +# else
  18. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
  19. +# endif
  20. typedef struct sigevent
  21. {
  22. --- a/libc/sysdeps/linux/ia64/bits/siginfo.h
  23. +++ b/libc/sysdeps/linux/ia64/bits/siginfo.h
  24. @@ -298,7 +298,11 @@ enum
  25. /* Structure to transport application-defined values with signals. */
  26. # define __SIGEV_MAX_SIZE 64
  27. -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  28. +# if __WORDSIZE == 64
  29. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  30. +# else
  31. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
  32. +# endif
  33. typedef struct sigevent
  34. {
  35. --- a/libc/sysdeps/linux/mips/bits/siginfo.h
  36. +++ b/libc/sysdeps/linux/mips/bits/siginfo.h
  37. @@ -265,8 +265,11 @@ enum
  38. /* Structure to transport application-defined values with signals. */
  39. # define __SIGEV_MAX_SIZE 64
  40. -# define __SIGEV_HEAD_SIZE (sizeof(long) + 2*sizeof(int))
  41. -# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE - __SIGEV_HEAD_SIZE) / sizeof (int))
  42. +# if __WORDSIZE == 64
  43. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
  44. +# else
  45. +# define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
  46. +# endif
  47. /* Forward declaration of the `pthread_attr_t' type. */
  48. struct __pthread_attr_s;