1 |
vapier 16/08/02 16:02:01 |
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-uapi-mqueue.h-add-missing-linux-types.h-include.patch |
13 |
00_all_0010-uapi-fix-System-V-buf-header-includes.patch |
14 |
Log: |
15 |
initial 4.7 patchset based on last 4.6 patchset |
16 |
|
17 |
Revision Changes Path |
18 |
1.1 src/patchsets/gentoo-headers/4.7/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.7/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.7/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 699dd71073063a82b6048f30e76a90647c0f9bb5 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 7fec7e36d921..256ad24c64a8 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.9.0 |
52 |
|
53 |
|
54 |
|
55 |
|
56 |
1.1 src/patchsets/gentoo-headers/4.7/00_all_0002-netfilter-pull-in-limits.h.patch |
57 |
|
58 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.7/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.7/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 7c4ff01a662c7e0bdafe1a3b388f62f718df9062 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 d93f949d1d9a..beed62c8ce92 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.9.0 |
90 |
|
91 |
|
92 |
|
93 |
|
94 |
1.1 src/patchsets/gentoo-headers/4.7/00_all_0003-convert-PAGE_SIZE-usage.patch |
95 |
|
96 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.7/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.7/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 22b698a7dd0ae7648ee63d08ae37d07d8ed376d3 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 4eb5972867c0..516bfcf62f64 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 36fb3b5fb181..58efd0799cd7 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.9.0 |
154 |
|
155 |
|
156 |
|
157 |
|
158 |
1.1 src/patchsets/gentoo-headers/4.7/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.7/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.7/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 5b0ba9af5b86c6b9c5cfe1ab675cb0bf3b862b00 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 e063effe0cc1..a98769e712ce 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.9.0 |
218 |
|
219 |
|
220 |
|
221 |
|
222 |
1.1 src/patchsets/gentoo-headers/4.7/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.7/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.7/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 b5181d05b07bcd7692258c8d8f4221b20b7d93df 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 7493c0ee51cc..c5dfae538b08 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.9.0 |
260 |
|
261 |
|
262 |
|
263 |
|
264 |
1.1 src/patchsets/gentoo-headers/4.7/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.7/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.7/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 fada0bf84fe473f9bd4556af47d78dbb035b2bfa 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 6fce7f096b88..f80e40de5b44 100644 |
288 |
--- a/arch/x86/Makefile |
289 |
+++ b/arch/x86/Makefile |
290 |
@@ -189,8 +189,10 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables |
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.9.0 |
303 |
|
304 |
|
305 |
|
306 |
|
307 |
1.1 src/patchsets/gentoo-headers/4.7/00_all_0007-timerfd-export-defines-to-userspace.patch |
308 |
|
309 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.7/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.7/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 8a861e4da0e10e92647f147d525f61ac08f090fa 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 ec10cfef166a..4ca7e8c0d4dc 100644 |
333 |
--- a/include/uapi/linux/Kbuild |
334 |
+++ b/include/uapi/linux/Kbuild |
335 |
@@ -405,6 +405,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 000000000000..6fcfaa8da173 |
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.9.0 |
387 |
|
388 |
|
389 |
|
390 |
|
391 |
1.1 src/patchsets/gentoo-headers/4.7/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.7/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.7/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 6f72d536c7de6627c69b137ec880b061eb19a0bf 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 0dba4e4ed2be..56b79fbd84dc 100644 |
427 |
--- a/include/uapi/linux/netlink.h |
428 |
+++ b/include/uapi/linux/netlink.h |
429 |
@@ -85,7 +85,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.9.0 |
440 |
|
441 |
|
442 |
|
443 |
|
444 |
1.1 src/patchsets/gentoo-headers/4.7/00_all_0009-uapi-mqueue.h-add-missing-linux-types.h-include.patch |
445 |
|
446 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.7/00_all_0009-uapi-mqueue.h-add-missing-linux-types.h-include.patch?rev=1.1&view=markup |
447 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.7/00_all_0009-uapi-mqueue.h-add-missing-linux-types.h-include.patch?rev=1.1&content-type=text/plain |
448 |
|
449 |
Index: 00_all_0009-uapi-mqueue.h-add-missing-linux-types.h-include.patch |
450 |
=================================================================== |
451 |
From 631e1dffc0c11059a277ed4544d8910704169c04 Mon Sep 17 00:00:00 2001 |
452 |
From: Mike Frysinger <vapier@××××××××.org> |
453 |
Date: Wed, 28 Oct 2015 18:41:33 -0400 |
454 |
Subject: [PATCH] uapi: mqueue.h: add missing linux/types.h include |
455 |
|
456 |
Commit 63159f5dcccb3858d88aaef800c4ee0eb4cc8577 changed the types from |
457 |
long to __kernel_long_t, but didn't add a linux/types.h include. Code |
458 |
that tries to include this header directly breaks: |
459 |
|
460 |
/usr/include/linux/mqueue.h:26:2: error: unknown type name '__kernel_long_t' |
461 |
__kernel_long_t mq_flags; /* message queue flags */ |
462 |
|
463 |
This also upsets configure tests for this header: |
464 |
checking linux/mqueue.h usability... no |
465 |
checking linux/mqueue.h presence... yes |
466 |
configure: WARNING: linux/mqueue.h: present but cannot be compiled |
467 |
configure: WARNING: linux/mqueue.h: check for missing prerequisite headers? |
468 |
configure: WARNING: linux/mqueue.h: see the Autoconf documentation |
469 |
configure: WARNING: linux/mqueue.h: section "Present But Cannot Be Compiled" |
470 |
configure: WARNING: linux/mqueue.h: proceeding with the compiler's result |
471 |
checking for linux/mqueue.h... no |
472 |
|
473 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
474 |
--- |
475 |
include/uapi/linux/mqueue.h | 2 ++ |
476 |
1 file changed, 2 insertions(+) |
477 |
|
478 |
diff --git a/include/uapi/linux/mqueue.h b/include/uapi/linux/mqueue.h |
479 |
index d0a2b8e89813..bbd5116ea739 100644 |
480 |
--- a/include/uapi/linux/mqueue.h |
481 |
+++ b/include/uapi/linux/mqueue.h |
482 |
@@ -18,6 +18,8 @@ |
483 |
#ifndef _LINUX_MQUEUE_H |
484 |
#define _LINUX_MQUEUE_H |
485 |
|
486 |
+#include <linux/types.h> |
487 |
+ |
488 |
#define MQ_PRIO_MAX 32768 |
489 |
/* per-uid limit of kernel memory used by mqueue, in bytes */ |
490 |
#define MQ_BYTES_MAX 819200 |
491 |
-- |
492 |
2.9.0 |
493 |
|
494 |
|
495 |
|
496 |
|
497 |
1.1 src/patchsets/gentoo-headers/4.7/00_all_0010-uapi-fix-System-V-buf-header-includes.patch |
498 |
|
499 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.7/00_all_0010-uapi-fix-System-V-buf-header-includes.patch?rev=1.1&view=markup |
500 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/gentoo-headers/4.7/00_all_0010-uapi-fix-System-V-buf-header-includes.patch?rev=1.1&content-type=text/plain |
501 |
|
502 |
Index: 00_all_0010-uapi-fix-System-V-buf-header-includes.patch |
503 |
=================================================================== |
504 |
From 5dd8da0b3b83fd83690df44916654b9eaa62fbab Mon Sep 17 00:00:00 2001 |
505 |
From: Mike Frysinger <vapier@g.o> |
506 |
Date: Mon, 2 Nov 2015 13:30:12 -0500 |
507 |
Subject: [PATCH] uapi: fix System V buf header includes |
508 |
|
509 |
These headers rely on kernel types but don't include the other headers |
510 |
that define them. So when you try to include them directly, you often |
511 |
hit build failures due to unknown types. |
512 |
|
513 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
514 |
--- |
515 |
include/uapi/asm-generic/ipcbuf.h | 2 ++ |
516 |
include/uapi/asm-generic/msgbuf.h | 3 +++ |
517 |
include/uapi/asm-generic/sembuf.h | 2 ++ |
518 |
include/uapi/asm-generic/shmbuf.h | 2 ++ |
519 |
4 files changed, 9 insertions(+) |
520 |
|
521 |
diff --git a/include/uapi/asm-generic/ipcbuf.h b/include/uapi/asm-generic/ipcbuf.h |
522 |
index 3dbcc1e771c0..c37b32ab1304 100644 |
523 |
--- a/include/uapi/asm-generic/ipcbuf.h |
524 |
+++ b/include/uapi/asm-generic/ipcbuf.h |
525 |
@@ -1,6 +1,8 @@ |
526 |
#ifndef __ASM_GENERIC_IPCBUF_H |
527 |
#define __ASM_GENERIC_IPCBUF_H |
528 |
|
529 |
+#include <linux/types.h> |
530 |
+ |
531 |
/* |
532 |
* The generic ipc64_perm structure: |
533 |
* Note extra padding because this structure is passed back and forth |
534 |
diff --git a/include/uapi/asm-generic/msgbuf.h b/include/uapi/asm-generic/msgbuf.h |
535 |
index f55ecc43c60f..473dcdc305a1 100644 |
536 |
--- a/include/uapi/asm-generic/msgbuf.h |
537 |
+++ b/include/uapi/asm-generic/msgbuf.h |
538 |
@@ -1,7 +1,10 @@ |
539 |
#ifndef __ASM_GENERIC_MSGBUF_H |
540 |
#define __ASM_GENERIC_MSGBUF_H |
541 |
|
542 |
+#include <linux/types.h> |
543 |
#include <asm/bitsperlong.h> |
544 |
+#include <asm/ipcbuf.h> |
545 |
+ |
546 |
/* |
547 |
* generic msqid64_ds structure. |
548 |
* |
549 |
diff --git a/include/uapi/asm-generic/sembuf.h b/include/uapi/asm-generic/sembuf.h |
550 |
index 4cb2c13e5090..f57240f7e6a2 100644 |
551 |
--- a/include/uapi/asm-generic/sembuf.h |
552 |
+++ b/include/uapi/asm-generic/sembuf.h |
553 |
@@ -1,7 +1,9 @@ |
554 |
#ifndef __ASM_GENERIC_SEMBUF_H |
555 |
#define __ASM_GENERIC_SEMBUF_H |
556 |
|
557 |
+#include <linux/types.h> |
558 |
#include <asm/bitsperlong.h> |
559 |
+#include <asm/ipcbuf.h> |
560 |
|
561 |
/* |
562 |
* The semid64_ds structure for x86 architecture. |
563 |
diff --git a/include/uapi/asm-generic/shmbuf.h b/include/uapi/asm-generic/shmbuf.h |
564 |
index 7e9fb2f0853b..f9e28e413c3c 100644 |
565 |
--- a/include/uapi/asm-generic/shmbuf.h |
566 |
+++ b/include/uapi/asm-generic/shmbuf.h |
567 |
@@ -1,7 +1,9 @@ |
568 |
#ifndef __ASM_GENERIC_SHMBUF_H |
569 |
#define __ASM_GENERIC_SHMBUF_H |
570 |
|
571 |
+#include <linux/types.h> |
572 |
#include <asm/bitsperlong.h> |
573 |
+#include <asm/ipcbuf.h> |
574 |
|
575 |
/* |
576 |
* The shmid64_ds structure for x86 architecture. |
577 |
-- |
578 |
2.9.0 |