aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch')
-rw-r--r--meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch b/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch
new file mode 100644
index 0000000000..515737c8e5
--- /dev/null
+++ b/meta-networking/recipes-support/netperf/files/0001-netlib.c-Move-including-sched.h-out-og-function.patch
@@ -0,0 +1,50 @@
+From 51a092ebb36dcc6180ceb93a9777258e826d9990 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 26 Sep 2018 18:11:10 -0700
+Subject: [PATCH] netlib.c: Move including sched.h out og function
+
+The shutdown_control() has this code where system headers are being
+included inside function body and this results in compile errors on musl
+especially when sched.h is included because sched.h defines a macro
+which defines a static function. This means it ends up being a static
+function inside another function and compiler calls it out
+
+In function 'bind_to_specific_processor':
+|
+/mnt/a/yoe/build/tmp/work/i586-yoe-linux-musl/netperf/2.7.0+git999-r0/recipe-sysroot/usr/include/sched.h:102:1:
+error: invalid storage class for function '__CPU_AND_S'
+| __CPU_op_func_S(AND, &)
+| ^~~~~~~~~~~~~~~
+
+Moving the definition out of function definition fixes the problem
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/netlib.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/netlib.c b/src/netlib.c
+index 9258424..60b032d 100644
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -2262,6 +2262,10 @@ shutdown_control()
+
+ }
+
++#if HAVE_SCHED_SETAFFINITY
++#include <sched.h>
++#endif
++
+ /*
+ bind_to_specific_processor will bind the calling process to the
+ processor in "processor" It has lots of ugly ifdefs to deal with
+@@ -2308,7 +2312,6 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
+ value will not tell you if you are bound vs unbound. */
+ bindprocessor(BINDPROCESS,getpid(),(cpu_t)mapped_affinity);
+ #elif HAVE_SCHED_SETAFFINITY
+-#include <sched.h>
+ /* in theory this should cover systems with more CPUs than bits in a
+ long, without having to specify __USE_GNU. we "cheat" by taking
+ defines from /usr/include/bits/sched.h, which we ass-u-me is
e/buildhistory-src-uri OpenEmbedded Core user contribution treesGrokmirror user
aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/oe-pkgdata-util
blob: e34fcbe0795231a52b254ef76a820aeb8145b011 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211