summaryrefslogtreecommitdiff
path: root/2.6.39
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-08-15 06:56:13 +0100
committerMike Frysinger <vapier@gentoo.org>2011-08-15 06:56:13 +0100
commitbcde788050e6084e68178d2d8dc3c0df9e7fc34a (patch)
tree371fa8ea14f5989be1d5822c8289770163ec724e /2.6.39
parentinitial 2.6.38 patchset based on last 2.6.36 patchset (diff)
downloadlinux-headers-patches-bcde788050e6084e68178d2d8dc3c0df9e7fc34a.tar.gz
linux-headers-patches-bcde788050e6084e68178d2d8dc3c0df9e7fc34a.tar.bz2
linux-headers-patches-bcde788050e6084e68178d2d8dc3c0df9e7fc34a.zip
initial 2.6.39 patchset based on last 2.6.38 patchset
Diffstat (limited to '2.6.39')
-rw-r--r--2.6.39/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch31
-rw-r--r--2.6.39/0002-linux-stat.h-remove-__GLIBC__-checks.patch28
-rw-r--r--2.6.39/0003-linux-stddef.h-export-offsetof-to-userspace.patch36
-rw-r--r--2.6.39/0004-linux-pull-in-other-needed-headers-for-userspace.patch94
-rw-r--r--2.6.39/0005-netfilter-pull-in-limits.h.patch28
-rw-r--r--2.6.39/0006-convert-PAGE_SIZE-usage.patch54
-rw-r--r--2.6.39/0007-HACK-asm-pull-in-C-library-headers.patch32
7 files changed, 303 insertions, 0 deletions
diff --git a/2.6.39/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch b/2.6.39/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
new file mode 100644
index 0000000..e9a7951
--- /dev/null
+++ b/2.6.39/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
@@ -0,0 +1,31 @@
+From 8b95678b6889196cf40190ee9b5ba0897fafa8f6 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 06:07:47 -0500
+Subject: [PATCH] kbuild: auto-convert size types in userspace headers
+
+Rather than constantly fixing up size type breakage in userspace headers,
+auto convert the types u_intXX_t, uintXX_t, intXX_t, uXX, and sXX to the
+appropriate __uXX or __sXX type.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ scripts/headers_install.pl | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl
+index efb3be1..a5230ef 100644
+--- a/scripts/headers_install.pl
++++ b/scripts/headers_install.pl
+@@ -39,6 +39,9 @@ foreach my $file (@files) {
+ $line =~ s/(^|\s)(inline)\b/$1__$2__/g;
+ $line =~ s/(^|\s)(asm)\b(\s|[(]|$)/$1__$2__$3/g;
+ $line =~ s/(^|\s|[(])(volatile)\b(\s|[(]|$)/$1__$2__$3/g;
++ $line =~ s/\b([us](8|16|32|64))\b/__$1/g;
++ $line =~ s/\b(u_?int(8|16|32|64)_t)\b/__u$2/g;
++ $line =~ s/\b(int(8|16|32|64)_t)\b/__s$2/g;
+ printf {$out} "%s", $line;
+ }
+ close $out;
+--
+1.7.6
+
diff --git a/2.6.39/0002-linux-stat.h-remove-__GLIBC__-checks.patch b/2.6.39/0002-linux-stat.h-remove-__GLIBC__-checks.patch
new file mode 100644
index 0000000..5d6b778
--- /dev/null
+++ b/2.6.39/0002-linux-stat.h-remove-__GLIBC__-checks.patch
@@ -0,0 +1,28 @@
+From a1a53a9743f0e6ac748f0c08c39509698787b9fa Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 06:52:59 -0500
+Subject: [PATCH] linux/stat.h: remove __GLIBC__ checks
+
+Only check __KERNEL__ so we don't assume the C library is glibc.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/stat.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/include/linux/stat.h b/include/linux/stat.h
+index 611c398..5460344 100644
+--- a/include/linux/stat.h
++++ b/include/linux/stat.h
+@@ -7,7 +7,7 @@
+
+ #endif
+
+-#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
++#ifdef __KERNEL__
+
+ #define S_IFMT 00170000
+ #define S_IFSOCK 0140000
+--
+1.7.6
+
diff --git a/2.6.39/0003-linux-stddef.h-export-offsetof-to-userspace.patch b/2.6.39/0003-linux-stddef.h-export-offsetof-to-userspace.patch
new file mode 100644
index 0000000..383ce5c
--- /dev/null
+++ b/2.6.39/0003-linux-stddef.h-export-offsetof-to-userspace.patch
@@ -0,0 +1,36 @@
+From b5396ace6b1dcf8def9ef214dbd882e424c2cd64 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 2 Jan 2009 02:34:03 -0500
+Subject: [PATCH] linux/stddef.h: export offsetof() to userspace
+
+Some userspace headers (like fuse.h) utilize the offsetof() macro. Some
+userspace packages (like lkcd) expect linux/stddef.h to provide this as
+well.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/stddef.h | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/include/linux/stddef.h b/include/linux/stddef.h
+index 6a40c76..4894d59 100644
+--- a/include/linux/stddef.h
++++ b/include/linux/stddef.h
+@@ -20,9 +20,12 @@ enum {
+ #undef offsetof
+ #ifdef __compiler_offsetof
+ #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
+-#else
+-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+ #endif
+ #endif /* __KERNEL__ */
+
++#include <stddef.h> /* newer gcc includes this */
++#ifndef offsetof
++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
++#endif
++
+ #endif
+--
+1.7.6
+
diff --git a/2.6.39/0004-linux-pull-in-other-needed-headers-for-userspace.patch b/2.6.39/0004-linux-pull-in-other-needed-headers-for-userspace.patch
new file mode 100644
index 0000000..f5b2de8
--- /dev/null
+++ b/2.6.39/0004-linux-pull-in-other-needed-headers-for-userspace.patch
@@ -0,0 +1,94 @@
+From 3030b2eca56b6c062d9c7ce5659fdcb78ca2bde9 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 07:41:01 -0500
+Subject: [PATCH] linux/*: pull in other needed headers for userspace
+
+mondo patch
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/cm4000_cs.h | 1 +
+ include/linux/dn.h | 1 +
+ include/linux/ext2_fs.h | 1 +
+ include/linux/if_ppp.h | 1 +
+ include/linux/netrom.h | 2 ++
+ include/linux/rose.h | 2 ++
+ 6 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h
+index 3c4aac4..ac230b6 100644
+--- a/include/linux/cm4000_cs.h
++++ b/include/linux/cm4000_cs.h
+@@ -2,6 +2,7 @@
+ #define _CM4000_H_
+
+ #include <linux/types.h>
++#include <linux/ioctl.h>
+
+ #define MAX_ATR 33
+
+diff --git a/include/linux/dn.h b/include/linux/dn.h
+index 9c50445..dc9f005 100644
+--- a/include/linux/dn.h
++++ b/include/linux/dn.h
+@@ -1,6 +1,7 @@
+ #ifndef _LINUX_DN_H
+ #define _LINUX_DN_H
+
++#include <linux/ioctl.h>
+ #include <linux/types.h>
+
+ /*
+diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h
+index 2dfa707..53792bf 100644
+--- a/include/linux/ext2_fs.h
++++ b/include/linux/ext2_fs.h
+@@ -18,6 +18,7 @@
+
+ #include <linux/types.h>
+ #include <linux/magic.h>
++#include <linux/fs.h>
+
+ /*
+ * The second extended filesystem constants/structures
+diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
+index c9ad383..4d70e16 100644
+--- a/include/linux/if_ppp.h
++++ b/include/linux/if_ppp.h
+@@ -35,6 +35,7 @@
+
+ #include <linux/types.h>
+ #include <linux/compiler.h>
++#include <linux/ppp_defs.h>
+
+ /*
+ * Packet sizes
+diff --git a/include/linux/netrom.h b/include/linux/netrom.h
+index 6939b32..af7313c 100644
+--- a/include/linux/netrom.h
++++ b/include/linux/netrom.h
+@@ -7,6 +7,8 @@
+ #ifndef NETROM_KERNEL_H
+ #define NETROM_KERNEL_H
+
++#include <linux/ax25.h>
++
+ #define NETROM_MTU 236
+
+ #define NETROM_T1 1
+diff --git a/include/linux/rose.h b/include/linux/rose.h
+index c7b4b18..e8289cd 100644
+--- a/include/linux/rose.h
++++ b/include/linux/rose.h
+@@ -7,6 +7,8 @@
+ #ifndef ROSE_KERNEL_H
+ #define ROSE_KERNEL_H
+
++#include <linux/ax25.h>
++
+ #define ROSE_MTU 251
+
+ #define ROSE_MAX_DIGIS 6
+--
+1.7.6
+
diff --git a/2.6.39/0005-netfilter-pull-in-limits.h.patch b/2.6.39/0005-netfilter-pull-in-limits.h.patch
new file mode 100644
index 0000000..0063ea7
--- /dev/null
+++ b/2.6.39/0005-netfilter-pull-in-limits.h.patch
@@ -0,0 +1,28 @@
+From 808a72e6ef18ad20b67b1c36d92d35ec4607448f Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 9 May 2009 17:30:35 -0400
+Subject: [PATCH] netfilter: pull in limits.h
+
+A few netfilter sub-headers use INT_MAX which is in limits.h.
+
+URL: http://bugs.gentoo.org/246160
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/netfilter.h | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
+index 7fa95df..76ff2b2 100644
+--- a/include/linux/netfilter.h
++++ b/include/linux/netfilter.h
+@@ -13,6 +13,7 @@
+ #endif
+ #include <linux/types.h>
+ #include <linux/compiler.h>
++#include <limits.h>
+
+ /* Responses from hook functions. */
+ #define NF_DROP 0
+--
+1.7.6
+
diff --git a/2.6.39/0006-convert-PAGE_SIZE-usage.patch b/2.6.39/0006-convert-PAGE_SIZE-usage.patch
new file mode 100644
index 0000000..7a76a51
--- /dev/null
+++ b/2.6.39/0006-convert-PAGE_SIZE-usage.patch
@@ -0,0 +1,54 @@
+From 36a16dc23bf3c775b33f5f355ed154d2e05dadf2 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 13 Feb 2010 03:09:23 -0500
+Subject: [PATCH] convert PAGE_SIZE usage
+
+The size of a page may change at runtime or based on kernel settings, so
+a static value at compile time doesn't work. More importantly, no one
+exports PAGE_SIZE to user space anymore.
+
+URL: http://bugs.gentoo.org/301431
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/linux/binfmts.h | 3 ++-
+ include/linux/resource.h | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
+index c3d6512..b5b71b3 100644
+--- a/include/linux/binfmts.h
++++ b/include/linux/binfmts.h
+@@ -1,6 +1,7 @@
+ #ifndef _LINUX_BINFMTS_H
+ #define _LINUX_BINFMTS_H
+
++#include <unistd.h>
+ #include <linux/capability.h>
+
+ struct pt_regs;
+@@ -11,7 +12,7 @@ struct pt_regs;
+ * prevent the kernel from being unduly impacted by misaddressed pointers.
+ * MAX_ARG_STRINGS is chosen to fit in a signed 32-bit integer.
+ */
+-#define MAX_ARG_STRLEN (PAGE_SIZE * 32)
++#define MAX_ARG_STRLEN (sysconf(_SC_PAGESIZE) * 32)
+ #define MAX_ARG_STRINGS 0x7FFFFFFF
+
+ /* sizeof(linux_binprm->buf) */
+diff --git a/include/linux/resource.h b/include/linux/resource.h
+index d01c96c..5a0559d 100644
+--- a/include/linux/resource.h
++++ b/include/linux/resource.h
+@@ -68,7 +68,8 @@ struct rlimit64 {
+ * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
+ * and other sensitive information are never written to disk.
+ */
+-#define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
++/* No one currently defines PAGE_SIZE bigger than 64kB */
++#define MLOCK_LIMIT (64 * 1024)
+
+ /*
+ * Due to binary compatibility, the actual resource numbers
+--
+1.7.6
+
diff --git a/2.6.39/0007-HACK-asm-pull-in-C-library-headers.patch b/2.6.39/0007-HACK-asm-pull-in-C-library-headers.patch
new file mode 100644
index 0000000..aef660e
--- /dev/null
+++ b/2.6.39/0007-HACK-asm-pull-in-C-library-headers.patch
@@ -0,0 +1,32 @@
+From 493acdbd339213d94a869ab7e95f7b899007edcf Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 29 Dec 2008 07:39:14 -0500
+Subject: [PATCH] HACK: asm/*: pull in C library headers
+
+Pull in the libc versions of these headers so that the proper
+userspace defines/typedefs are utilized.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ include/asm-generic/fcntl.h | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
+index 84793c7..8c0b5f6 100644
+--- a/include/asm-generic/fcntl.h
++++ b/include/asm-generic/fcntl.h
+@@ -1,6 +1,11 @@
+ #ifndef _ASM_GENERIC_FCNTL_H
+ #define _ASM_GENERIC_FCNTL_H
+
++/* Pull in fcntl structs from the libc #244470 */
++#include <fcntl.h>
++#define HAVE_ARCH_STRUCT_FLOCK
++#define HAVE_ARCH_STRUCT_FLOCK64
++
+ #include <linux/types.h>
+
+ /*
+--
+1.7.6
+