1 diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c
2 index 3b0aea92c05..998f2c66289 100644
6 #define xmalloc(S) malloc (S)
7 #define xrealloc(V,S) realloc (V,S)
9 +#if !defined(__ANDROID__) && defined(__linux__)
21 @@ -3265,7 +3274,7 @@ __gnat_lwp_self (void)
23 /* Dynamic cpu sets */
27 __gnat_cpu_alloc (size_t count)
29 return CPU_ALLOC (count);
30 @@ -3278,33 +3287,33 @@ __gnat_cpu_alloc_size (size_t count)
34 -__gnat_cpu_free (cpu_set_t *set)
35 +__gnat_cpu_free (void *set)
38 + CPU_FREE ((cpu_set_t *)set);
42 -__gnat_cpu_zero (size_t count, cpu_set_t *set)
43 +__gnat_cpu_zero (size_t count, void *set)
45 CPU_ZERO_S (count, set);
49 -__gnat_cpu_set (int cpu, size_t count, cpu_set_t *set)
50 +__gnat_cpu_set (int cpu, size_t count, void *set)
52 /* Ada handles CPU numbers starting from 1, while C identifies the first
53 CPU by a 0, so we need to adjust. */
54 - CPU_SET_S (cpu - 1, count, set);
55 + CPU_SET_S (cpu - 1, count, (cpu_set_t *)set);
58 #else /* !CPU_ALLOC */
64 __gnat_cpu_alloc (size_t count ATTRIBUTE_UNUSED)
66 - return (cpu_set_t *) xmalloc (sizeof (cpu_set_t));
67 + return xmalloc (sizeof (cpu_set_t));
71 @@ -3314,23 +3323,23 @@ __gnat_cpu_alloc_size (size_t count ATTRIBUTE_UNUSED)
75 -__gnat_cpu_free (cpu_set_t *set)
76 +__gnat_cpu_free (void *set)
82 -__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
83 +__gnat_cpu_zero (size_t count ATTRIBUTE_UNUSED, void *set)
89 -__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, cpu_set_t *set)
90 +__gnat_cpu_set (int cpu, size_t count ATTRIBUTE_UNUSED, void *set)
92 /* Ada handles CPU numbers starting from 1, while C identifies the first
93 CPU by a 0, so we need to adjust. */
94 - CPU_SET (cpu - 1, set);
95 + CPU_SET (cpu - 1, (cpu_set_t *)set);
97 #endif /* !CPU_ALLOC */
98 #endif /* __linux__ */
99 diff --git a/gcc/ada/adaint.h b/gcc/ada/adaint.h
100 index 0d12f7e9020..7b3def03fb0 100644
101 --- a/gcc/ada/adaint.h
102 +++ b/gcc/ada/adaint.h
103 @@ -316,13 +316,11 @@ extern void *__gnat_lwp_self (void);
105 /* Routines for interface to required CPU set primitives */
109 -extern cpu_set_t *__gnat_cpu_alloc (size_t);
110 +extern void *__gnat_cpu_alloc (size_t);
111 extern size_t __gnat_cpu_alloc_size (size_t);
112 -extern void __gnat_cpu_free (cpu_set_t *);
113 -extern void __gnat_cpu_zero (size_t, cpu_set_t *);
114 -extern void __gnat_cpu_set (int, size_t, cpu_set_t *);
115 +extern void __gnat_cpu_free (void *);
116 +extern void __gnat_cpu_zero (size_t, void *);
117 +extern void __gnat_cpu_set (int, size_t, void *);