1ad84c56d4b43e9da528a829239fc979e1d10f66
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uclibc / 0.9.33.2 / 0056-siginfo_h-__SIGEV_PAD_SIZE-takes-__WORDSIZE-into-account.patch
1 siginfo.h: __SIGEV_PAD_SIZE takes __WORDSIZE into account
2 Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
3
4 From b97b4b698b023f75b54f987859c856ab4861ea00 Mon Sep 17 00:00:00 2001
5 From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
6 Date: Thu, 02 Jan 2014 15:02:12 +0000
7 Subject: siginfo.h: __SIGEV_PAD_SIZE takes __WORDSIZE into account
8
9 Make __SIGEV_PAD_SIZE to take __WORDSIZE into account for alpha, mips
10 and ia64 arches.
11
12 Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
13 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 ---
15 (limited to 'libc/sysdeps/linux')
16
17 diff --git a/libc/sysdeps/linux/alpha/bits/siginfo.h b/libc/sysdeps/linux/alpha/bits/siginfo.h
18 index 9993f66..0a37ad0 100644
19 --- a/libc/sysdeps/linux/alpha/bits/siginfo.h
20 +++ b/libc/sysdeps/linux/alpha/bits/siginfo.h
21 @@ -257,7 +257,11 @@ enum
22  
23  /* Structure to transport application-defined values with signals.  */
24  # define __SIGEV_MAX_SIZE      64
25 -# define __SIGEV_PAD_SIZE      ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
26 +# if __WORDSIZE == 64
27 +#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
28 +# else
29 +#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
30 +# endif
31  
32  typedef struct sigevent
33    {
34 diff --git a/libc/sysdeps/linux/ia64/bits/siginfo.h b/libc/sysdeps/linux/ia64/bits/siginfo.h
35 index 82cc73f..3ac988b 100644
36 --- a/libc/sysdeps/linux/ia64/bits/siginfo.h
37 +++ b/libc/sysdeps/linux/ia64/bits/siginfo.h
38 @@ -297,7 +297,11 @@ enum
39  
40  /* Structure to transport application-defined values with signals.  */
41  # define __SIGEV_MAX_SIZE      64
42 -# define __SIGEV_PAD_SIZE      ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
43 +# if __WORDSIZE == 64
44 +#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
45 +# else
46 +#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
47 +# endif
48  
49  typedef struct sigevent
50    {
51 diff --git a/libc/sysdeps/linux/mips/bits/siginfo.h b/libc/sysdeps/linux/mips/bits/siginfo.h
52 index 84b08ca..a6e4135 100644
53 --- a/libc/sysdeps/linux/mips/bits/siginfo.h
54 +++ b/libc/sysdeps/linux/mips/bits/siginfo.h
55 @@ -264,8 +264,11 @@ enum
56  
57  /* Structure to transport application-defined values with signals.  */
58  # define __SIGEV_MAX_SIZE      64
59 -# define __SIGEV_HEAD_SIZE     (sizeof(long) + 2*sizeof(int))
60 -# define __SIGEV_PAD_SIZE      ((__SIGEV_MAX_SIZE - __SIGEV_HEAD_SIZE) / sizeof (int))
61 +# if __WORDSIZE == 64
62 +#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
63 +# else
64 +#  define __SIGEV_PAD_SIZE     ((__SIGEV_MAX_SIZE / sizeof (int)) - 3)
65 +# endif
66  
67  /* Forward declaration of the `pthread_attr_t' type.  */
68  struct __pthread_attr_s;
69 --
70 cgit v0.9.1