Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/gentoo-headers/4.2: 00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch 00_all_0002-netfilter-pull-in-limits.h.patch 00_all_0003-convert-PAGE_SIZE-usage.patch 00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch 00_all_0005-unifdef-drop-unused-errno.h-include.patch 00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch 00_all_0007-timerfd-export-defines-to-userspace.patch 00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch 00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch 00_all_0010-Revert-Hexagon-fix-signal.c-compile-error.patch
Date: Tue, 01 Sep 2015 02:38:21
Message-Id: 20150901023818.C4049181@oystercatcher.gentoo.org
1 vapier 15/09/01 02:38:18
2
3 Added:
4 00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
5 00_all_0002-netfilter-pull-in-limits.h.patch
6 00_all_0003-convert-PAGE_SIZE-usage.patch
7 00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
8 00_all_0005-unifdef-drop-unused-errno.h-include.patch
9 00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
10 00_all_0007-timerfd-export-defines-to-userspace.patch
11 00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
12 00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch
13 00_all_0010-Revert-Hexagon-fix-signal.c-compile-error.patch
14 Log:
15 initial 4.2 patchset based on last 4.1 patchset
16
17 Revision Changes Path
18 1.1 src/patchsets/gentoo-headers/4.2/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
19
20 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&view=markup
21 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&content-type=text/plain
22
23 Index: 00_all_0001-linux-stat.h-remove-__GLIBC__-checks.patch
24 ===================================================================
25 From d1883002317ad1bed6164aeaba8746ee3379290d Mon Sep 17 00:00:00 2001
26 From: Mike Frysinger <vapier@g.o>
27 Date: Mon, 29 Dec 2008 06:52:59 -0500
28 Subject: [PATCH] linux/stat.h: remove __GLIBC__ checks
29
30 Only check __KERNEL__ so we don't assume the C library is glibc.
31
32 Signed-off-by: Mike Frysinger <vapier@g.o>
33 ---
34 include/uapi/linux/stat.h | 2 +-
35 1 file changed, 1 insertion(+), 1 deletion(-)
36
37 diff --git a/include/uapi/linux/stat.h b/include/uapi/linux/stat.h
38 index 7fec7e3..256ad24 100644
39 --- a/include/uapi/linux/stat.h
40 +++ b/include/uapi/linux/stat.h
41 @@ -2,7 +2,7 @@
42 #define _UAPI_LINUX_STAT_H
43
44
45 -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
46 +#if defined(__KERNEL__)
47
48 #define S_IFMT 00170000
49 #define S_IFSOCK 0140000
50 --
51 2.5.0
52
53
54
55
56 1.1 src/patchsets/gentoo-headers/4.2/00_all_0002-netfilter-pull-in-limits.h.patch
57
58 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0002-netfilter-pull-in-limits.h.patch?rev=1.1&view=markup
59 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0002-netfilter-pull-in-limits.h.patch?rev=1.1&content-type=text/plain
60
61 Index: 00_all_0002-netfilter-pull-in-limits.h.patch
62 ===================================================================
63 From 890e133586ee46dffad6b93ea297826988700fbf Mon Sep 17 00:00:00 2001
64 From: Mike Frysinger <vapier@g.o>
65 Date: Sat, 9 May 2009 17:30:35 -0400
66 Subject: [PATCH] netfilter: pull in limits.h
67
68 A few netfilter sub-headers use INT_MAX which is in limits.h.
69
70 URL: http://bugs.gentoo.org/246160
71 Signed-off-by: Mike Frysinger <vapier@g.o>
72 ---
73 include/uapi/linux/netfilter.h | 1 +
74 1 file changed, 1 insertion(+)
75
76 diff --git a/include/uapi/linux/netfilter.h b/include/uapi/linux/netfilter.h
77 index d93f949..beed62c 100644
78 --- a/include/uapi/linux/netfilter.h
79 +++ b/include/uapi/linux/netfilter.h
80 @@ -6,6 +6,7 @@
81 #include <linux/sysctl.h>
82 #include <linux/in.h>
83 #include <linux/in6.h>
84 +#include <limits.h>
85
86 /* Responses from hook functions. */
87 #define NF_DROP 0
88 --
89 2.5.0
90
91
92
93
94 1.1 src/patchsets/gentoo-headers/4.2/00_all_0003-convert-PAGE_SIZE-usage.patch
95
96 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0003-convert-PAGE_SIZE-usage.patch?rev=1.1&view=markup
97 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0003-convert-PAGE_SIZE-usage.patch?rev=1.1&content-type=text/plain
98
99 Index: 00_all_0003-convert-PAGE_SIZE-usage.patch
100 ===================================================================
101 From a418c756ca738db681b9bcb4bdd87fc194ff3664 Mon Sep 17 00:00:00 2001
102 From: Mike Frysinger <vapier@g.o>
103 Date: Sat, 13 Feb 2010 03:09:23 -0500
104 Subject: [PATCH] convert PAGE_SIZE usage
105
106 The size of a page may change at runtime or based on kernel settings, so
107 a static value at compile time doesn't work. More importantly, no one
108 exports PAGE_SIZE to user space anymore.
109
110 URL: http://bugs.gentoo.org/301431
111 Signed-off-by: Mike Frysinger <vapier@g.o>
112 ---
113 include/uapi/linux/binfmts.h | 3 ++-
114 include/uapi/linux/resource.h | 3 ++-
115 2 files changed, 4 insertions(+), 2 deletions(-)
116
117 diff --git a/include/uapi/linux/binfmts.h b/include/uapi/linux/binfmts.h
118 index 4eb5972..516bfcf 100644
119 --- a/include/uapi/linux/binfmts.h
120 +++ b/include/uapi/linux/binfmts.h
121 @@ -1,6 +1,7 @@
122 #ifndef _UAPI_LINUX_BINFMTS_H
123 #define _UAPI_LINUX_BINFMTS_H
124
125 +#include <unistd.h>
126 #include <linux/capability.h>
127
128 struct pt_regs;
129 @@ -11,7 +12,7 @@ struct pt_regs;
130 * prevent the kernel from being unduly impacted by misaddressed pointers.
131 * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
132 */
133 -#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
134 +#define MAX_ARG_STRLEN (sysconf(_SC_PAGESIZE) * 32)
135 #define MAX_ARG_STRINGS 0x7FFFFFFF
136
137 /* sizeof(linux_binprm->buf) */
138 diff --git a/include/uapi/linux/resource.h b/include/uapi/linux/resource.h
139 index 36fb3b5..58efd07 100644
140 --- a/include/uapi/linux/resource.h
141 +++ b/include/uapi/linux/resource.h
142 @@ -68,7 +68,8 @@ struct rlimit64 {
143 * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
144 * and other sensitive information are never written to disk.
145 */
146 -#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
147 +/* No one currently defines PAGE_SIZE bigger than 64kB */
148 +#define MLOCK_LIMIT (64 * 1024)
149
150 /*
151 * Due to binary compatibility, the actual resource numbers
152 --
153 2.5.0
154
155
156
157
158 1.1 src/patchsets/gentoo-headers/4.2/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
159
160 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&view=markup
161 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch?rev=1.1&content-type=text/plain
162
163 Index: 00_all_0004-asm-generic-fcntl.h-namespace-kernel-file-structs.patch
164 ===================================================================
165 From 46c9e4a06a7cd6b8f9cf2d4a543652254825551c Mon Sep 17 00:00:00 2001
166 From: Mike Frysinger <vapier@g.o>
167 Date: Mon, 29 Dec 2008 07:39:14 -0500
168 Subject: [PATCH] asm-generic/fcntl.h: namespace kernel file structs
169
170 No one should be using these structs, but just in case they are,
171 keep them available in the __kernel_ namespace.
172
173 Otherwise, trying to include something like:
174 #include <fcntl.h>
175 #include <linux/inotify.h>
176 leads to horrible failure.
177
178 URL: http://bugs.gentoo.org/244470
179 URL: http://bugs.gentoo.org/388633
180 Signed-off-by: Mike Frysinger <vapier@g.o>
181 ---
182 include/uapi/asm-generic/fcntl.h | 6 +++---
183 1 file changed, 3 insertions(+), 3 deletions(-)
184
185 diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h
186 index e063eff..a98769e 100644
187 --- a/include/uapi/asm-generic/fcntl.h
188 +++ b/include/uapi/asm-generic/fcntl.h
189 @@ -152,7 +152,7 @@
190 #define F_OWNER_PID 1
191 #define F_OWNER_PGRP 2
192
193 -struct f_owner_ex {
194 +struct __kernel_f_owner_ex {
195 int type;
196 __kernel_pid_t pid;
197 };
198 @@ -192,7 +192,7 @@ struct f_owner_ex {
199 #define __ARCH_FLOCK_PAD
200 #endif
201
202 -struct flock {
203 +struct __kernel_flock {
204 short l_type;
205 short l_whence;
206 __kernel_off_t l_start;
207 @@ -207,7 +207,7 @@ struct flock {
208 #define __ARCH_FLOCK64_PAD
209 #endif
210
211 -struct flock64 {
212 +struct __kernel_flock64 {
213 short l_type;
214 short l_whence;
215 __kernel_loff_t l_start;
216 --
217 2.5.0
218
219
220
221
222 1.1 src/patchsets/gentoo-headers/4.2/00_all_0005-unifdef-drop-unused-errno.h-include.patch
223
224 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0005-unifdef-drop-unused-errno.h-include.patch?rev=1.1&view=markup
225 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0005-unifdef-drop-unused-errno.h-include.patch?rev=1.1&content-type=text/plain
226
227 Index: 00_all_0005-unifdef-drop-unused-errno.h-include.patch
228 ===================================================================
229 From e427e4e87f22cdc7f2d504dec1d52e635da887df Mon Sep 17 00:00:00 2001
230 From: Mike Frysinger <vapier@g.o>
231 Date: Tue, 6 Dec 2011 17:22:42 -0500
232 Subject: [PATCH] unifdef: drop unused errno.h include
233
234 This is the only header on my system that ends up requiring kernel
235 headers, so if the kernel headers aren't available, we end up being
236 unable to install kernel headers :).
237
238 Since this file doesn't actually use anything from errno.h, drop
239 the include so it at least makes us a bit more robust on glibc.
240
241 Signed-off-by: Mike Frysinger <vapier@g.o>
242 ---
243 scripts/unifdef.c | 1 -
244 1 file changed, 1 deletion(-)
245
246 diff --git a/scripts/unifdef.c b/scripts/unifdef.c
247 index 7493c0e..c5dfae5 100644
248 --- a/scripts/unifdef.c
249 +++ b/scripts/unifdef.c
250 @@ -48,7 +48,6 @@
251
252 #include <ctype.h>
253 #include <err.h>
254 -#include <errno.h>
255 #include <stdarg.h>
256 #include <stdbool.h>
257 #include <stdio.h>
258 --
259 2.5.0
260
261
262
263
264 1.1 src/patchsets/gentoo-headers/4.2/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
265
266 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch?rev=1.1&view=markup
267 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch?rev=1.1&content-type=text/plain
268
269 Index: 00_all_0006-x86-do-not-build-relocs-tool-when-installing-headers.patch
270 ===================================================================
271 From bcf93b4ec71525b598f57092698426c587fdca4c Mon Sep 17 00:00:00 2001
272 From: Mike Frysinger <vapier@g.o>
273 Date: Sat, 15 Nov 2014 03:37:38 -0500
274 Subject: [PATCH] x86: do not build relocs tool when installing headers
275
276 This isn't needed to install headers, so don't bother building it.
277 Otherwise we run into a chicken/egg issue where we need the kernel
278 headers in order to install the kernel headers. It's also a waste
279 of time.
280
281 Signed-off-by: Mike Frysinger <vapier@g.o>
282 ---
283 arch/x86/Makefile | 2 ++
284 1 file changed, 2 insertions(+)
285
286 diff --git a/arch/x86/Makefile b/arch/x86/Makefile
287 index 118e6de..31bf7b5 100644
288 --- a/arch/x86/Makefile
289 +++ b/arch/x86/Makefile
290 @@ -174,8 +174,10 @@ KBUILD_CFLAGS += $(call cc-option,-mno-avx,)
291 KBUILD_CFLAGS += $(mflags-y)
292 KBUILD_AFLAGS += $(mflags-y)
293
294 +ifneq ($(filter-out headers_install,$(MAKECMDGOALS)),)
295 archscripts: scripts_basic
296 $(Q)$(MAKE) $(build)=arch/x86/tools relocs
297 +endif
298
299 ###
300 # Syscall table generation
301 --
302 2.5.0
303
304
305
306
307 1.1 src/patchsets/gentoo-headers/4.2/00_all_0007-timerfd-export-defines-to-userspace.patch
308
309 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0007-timerfd-export-defines-to-userspace.patch?rev=1.1&view=markup
310 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0007-timerfd-export-defines-to-userspace.patch?rev=1.1&content-type=text/plain
311
312 Index: 00_all_0007-timerfd-export-defines-to-userspace.patch
313 ===================================================================
314 From c13b7edeb501990f6ae6716b2d133a2ba712c547 Mon Sep 17 00:00:00 2001
315 From: Mike Frysinger <vapier@g.o>
316 Date: Tue, 30 Dec 2014 19:14:51 -0500
317 Subject: [PATCH] timerfd: export defines to userspace
318
319 Since userspace is expected to call timerfd syscalls directly with these
320 flags/ioctls, make sure we export them so they don't have to duplicate
321 the values themselves.
322
323 Signed-off-by: Mike Frysinger <vapier@g.o>
324 ---
325 include/linux/timerfd.h | 20 +-------------------
326 include/uapi/linux/Kbuild | 1 +
327 include/uapi/linux/timerfd.h | 36 ++++++++++++++++++++++++++++++++++++
328 3 files changed, 38 insertions(+), 19 deletions(-)
329 create mode 100644 include/uapi/linux/timerfd.h
330
331 diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
332 index 1ff9942..5c4307d 100644
333 --- a/include/uapi/linux/Kbuild
334 +++ b/include/uapi/linux/Kbuild
335 @@ -394,6 +394,7 @@ header-y += telephony.h
336 header-y += termios.h
337 header-y += thermal.h
338 header-y += time.h
339 +header-y += timerfd.h
340 header-y += times.h
341 header-y += timex.h
342 header-y += tiocl.h
343 diff --git a/include/uapi/linux/timerfd.h b/include/uapi/linux/timerfd.h
344 new file mode 100644
345 index 0000000..6fcfaa8
346 --- /dev/null
347 +++ b/include/uapi/linux/timerfd.h
348 @@ -0,0 +1,36 @@
349 +/*
350 + * include/linux/timerfd.h
351 + *
352 + * Copyright (C) 2007 Davide Libenzi <davidel@×××××××××××.org>
353 + *
354 + */
355 +
356 +#ifndef _UAPI_LINUX_TIMERFD_H
357 +#define _UAPI_LINUX_TIMERFD_H
358 +
359 +#include <linux/types.h>
360 +
361 +/* For O_CLOEXEC and O_NONBLOCK */
362 +#include <linux/fcntl.h>
363 +
364 +/* For _IO helpers */
365 +#include <linux/ioctl.h>
366 +
367 +/*
368 + * CAREFUL: Check include/asm-generic/fcntl.h when defining
369 + * new flags, since they might collide with O_* ones. We want
370 + * to re-use O_* flags that couldn't possibly have a meaning
371 + * from eventfd, in order to leave a free define-space for
372 + * shared O_* flags.
373 + *
374 + * Also make sure to update the masks in include/linux/timerfd.h
375 + * when adding new flags.
376 + */
377 +#define TFD_TIMER_ABSTIME (1 << 0)
378 +#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
379 +#define TFD_CLOEXEC O_CLOEXEC
380 +#define TFD_NONBLOCK O_NONBLOCK
381 +
382 +#define TFD_IOC_SET_TICKS _IOW('T', 0, __u64)
383 +
384 +#endif /* _UAPI_LINUX_TIMERFD_H */
385 --
386 2.5.0
387
388
389
390
391 1.1 src/patchsets/gentoo-headers/4.2/00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
392
393 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch?rev=1.1&view=markup
394 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch?rev=1.1&content-type=text/plain
395
396 Index: 00_all_0008-netlink-drop-int-cast-on-length-arg-in-NLMSG_OK.patch
397 ===================================================================
398 From b075220492da6243d5b26626e193dde30e5eeb3e Mon Sep 17 00:00:00 2001
399 From: Mike Frysinger <vapier@g.o>
400 Date: Thu, 5 Mar 2015 00:26:58 -0500
401 Subject: [PATCH] netlink: drop (int) cast on length arg in NLMSG_OK
402
403 The NLMSG_OK macro compares three things:
404 - the len arg from the user
405 - a size_t: sizeof(struct nlmsghdr)
406 - an int: sizeof(struct nlmsghdr) casted
407 - an u32: the nlmsghdr->nlmsg_len member
408
409 When building with -Wsign-compare, this macro triggers a signed compare
410 warning. This is because it compares len to an int, and then compares
411 it to a u32. If len is signed, we get a warning due to the last test.
412 If len is unsigned, we get a warning due to the first test. Like in
413 strace:
414 socketutils.c:145:8: warning: comparison between signed and unsigned
415 integer expressions [-Wsign-compare]
416
417 Lets drop the int cast on the first sizeof. This way, once the user
418 casts len to an unsigned value, everything shakes out correctly.
419
420 Signed-off-by: Mike Frysinger <vapier@g.o>
421 ---
422 include/uapi/linux/netlink.h | 2 +-
423 1 file changed, 1 insertion(+), 1 deletion(-)
424
425 diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
426 index cf6a65c..dcbc13d 100644
427 --- a/include/uapi/linux/netlink.h
428 +++ b/include/uapi/linux/netlink.h
429 @@ -84,7 +84,7 @@ struct nlmsghdr {
430 #define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
431 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
432 (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
433 -#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \
434 +#define NLMSG_OK(nlh,len) ((len) >= sizeof(struct nlmsghdr) && \
435 (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
436 (nlh)->nlmsg_len <= (len))
437 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
438 --
439 2.5.0
440
441
442
443
444 1.1 src/patchsets/gentoo-headers/4.2/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch
445
446 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch?rev=1.1&view=markup
447 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch?rev=1.1&content-type=text/plain
448
449 Index: 00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch
450 ===================================================================
451 From 0ec80159fcbe90c5c562e4967e01f5345f6c223b Mon Sep 17 00:00:00 2001
452 From: Mike Frysinger <vapier@××××××××.org>
453 Date: Tue, 21 Apr 2015 14:28:20 -0400
454 Subject: [PATCH] Revert "MIPS: Provide correct siginfo_t.si_stime"
455
456 This reverts commit 8cb48fe169dd682b6c29a3b7ef18333e4f577890.
457
458 UAPI headers cannot use "uapi/" in their paths by design -- when they're
459 installed, they do not have the uapi/ prefix. Otherwise doing so breaks
460 userland badly:
461 $ printf '#include <stddef.h>\n#include <linux/signal.h>\n' > test.c
462 $ mips64-unknown-linux-gnu-gcc -c test.c
463 In file included from /usr/mips64-unknown-linux-gnu/usr/include/linux/signal.h:5:0,
464 from test.c:2:
465 /usr/mips64-unknown-linux-gnu/usr/include/asm/siginfo.h:31:38: fatal error: uapi/asm-generic/siginfo.h: No such file or directory
466 compilation terminated.
467
468 Signed-off-by: Mike Frysinger <vapier@××××××××.org>
469 ---
470 arch/mips/include/asm/siginfo.h | 29 +++++++++++++++++++++++++++++
471 arch/mips/include/uapi/asm/siginfo.h | 11 ++++++++---
472 2 files changed, 37 insertions(+), 3 deletions(-)
473 create mode 100644 arch/mips/include/asm/siginfo.h
474
475 diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h
476 new file mode 100644
477 index 0000000..dd9a762
478 --- /dev/null
479 +++ b/arch/mips/include/asm/siginfo.h
480 @@ -0,0 +1,29 @@
481 +/*
482 + * This file is subject to the terms and conditions of the GNU General Public
483 + * License. See the file "COPYING" in the main directory of this archive
484 + * for more details.
485 + *
486 + * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle
487 + * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
488 + */
489 +#ifndef _ASM_SIGINFO_H
490 +#define _ASM_SIGINFO_H
491 +
492 +#include <uapi/asm/siginfo.h>
493 +
494 +
495 +/*
496 + * Duplicated here because of <asm-generic/siginfo.h> braindamage ...
497 + */
498 +#include <linux/string.h>
499 +
500 +static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
501 +{
502 + if (from->si_code < 0)
503 + memcpy(to, from, sizeof(*to));
504 + else
505 + /* _sigchld is currently the largest know union member */
506 + memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
507 +}
508 +
509 +#endif /* _ASM_SIGINFO_H */
510 diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
511 index 2cb7fde..d08f83f 100644
512 --- a/arch/mips/include/uapi/asm/siginfo.h
513 +++ b/arch/mips/include/uapi/asm/siginfo.h
514 @@ -16,6 +16,13 @@
515 #define HAVE_ARCH_SIGINFO_T
516
517 /*
518 + * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
519 + * by design ...
520 + */
521 +#define HAVE_ARCH_COPY_SIGINFO
522 +struct siginfo;
523 +
524 +/*
525 * Careful to keep union _sifields from shifting ...
526 */
527 #if _MIPS_SZLONG == 32
528 @@ -28,9 +35,8 @@
529
530 #define __ARCH_SIGSYS
531
532 -#include <uapi/asm-generic/siginfo.h>
533 +#include <asm-generic/siginfo.h>
534
535 -/* We can't use generic siginfo_t, because our si_code and si_errno are swapped */
536 typedef struct siginfo {
537 int si_signo;
538 int si_code;
539 @@ -118,6 +124,5 @@ typedef struct siginfo {
540 #define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */
541 #define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */
542
543 -#include <asm-generic/siginfo.h>
544
545 #endif /* _UAPI_ASM_SIGINFO_H */
546 --
547 2.5.0
548
549
550
551
552 1.1 src/patchsets/gentoo-headers/4.2/00_all_0010-Revert-Hexagon-fix-signal.c-compile-error.patch
553
554 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0010-Revert-Hexagon-fix-signal.c-compile-error.patch?rev=1.1&view=markup
555 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.2/00_all_0010-Revert-Hexagon-fix-signal.c-compile-error.patch?rev=1.1&content-type=text/plain
556
557 Index: 00_all_0010-Revert-Hexagon-fix-signal.c-compile-error.patch
558 ===================================================================
559 From e4c979637a893be7917d64e474111ddf91e0f693 Mon Sep 17 00:00:00 2001
560 From: Mike Frysinger <vapier@g.o>
561 Date: Wed, 22 Apr 2015 21:26:34 -0400
562 Subject: [PATCH] Revert "Hexagon: fix signal.c compile error"
563
564 This reverts commit f3f601c1d2728f02544cfd143eaa82e5398b3e9b.
565
566 UAPI headers cannot use "uapi/" in their paths by design -- when they're
567 installed, they do not have the uapi/ prefix. Otherwise doing so breaks
568 userland badly.
569
570 Signed-off-by: Mike Frysinger <vapier@g.o>
571 ---
572 arch/hexagon/include/uapi/asm/signal.h | 2 --
573 1 file changed, 2 deletions(-)
574
575 diff --git a/arch/hexagon/include/uapi/asm/signal.h b/arch/hexagon/include/uapi/asm/signal.h
576 index 98106e5..24b9988 100644
577 --- a/arch/hexagon/include/uapi/asm/signal.h
578 +++ b/arch/hexagon/include/uapi/asm/signal.h
579 @@ -19,8 +19,6 @@
580 #ifndef _ASM_SIGNAL_H
581 #define _ASM_SIGNAL_H
582
583 -#include <uapi/asm/registers.h>
584 -
585 extern unsigned long __rt_sigtramp_template[2];
586
587 void do_signal(struct pt_regs *regs);
588 --
589 2.5.0