* [gentoo-commits] gentoo commit in src/patchsets/gentoo-headers/2.6.33: 0001-kbuild-auto-convert-size-types-in-userspace-headers.patch 0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch 0003-linux-stat.h-remove-__GLIBC__-checks.patch 0004-linux-stddef.h-export-offsetof-to-userspace.patch 0005-linux-pull-in-other-needed-headers-for-userspace.patch 0006-HACK-asm-pull-in-C-library-headers.patch 0007-HACK-linux-pull-in-C-library-headers.patch 0008-netfilter-pull-in-limits.h.patch 0009-convert-PAGE_SIZE-usage.patch
@ 2010-03-08 5:22 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2010-03-08 5:22 UTC (permalink / raw
To: gentoo-commits
vapier 10/03/08 05:22:08
Added:
0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch
0003-linux-stat.h-remove-__GLIBC__-checks.patch
0004-linux-stddef.h-export-offsetof-to-userspace.patch
0005-linux-pull-in-other-needed-headers-for-userspace.patch
0006-HACK-asm-pull-in-C-library-headers.patch
0007-HACK-linux-pull-in-C-library-headers.patch
0008-netfilter-pull-in-limits.h.patch
0009-convert-PAGE_SIZE-usage.patch
Log:
initial 2.6.33 patchset based on last 2.6.32 patchset
Revision Changes Path
1.1 src/patchsets/gentoo-headers/2.6.33/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0001-kbuild-auto-convert-size-types-in-userspace-headers.patch?rev=1.1&content-type=text/plain
Index: 0001-kbuild-auto-convert-size-types-in-userspace-headers.patch
===================================================================
From e5ccdcce6e6543a35da66a7c1f784331580e87f2 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 29 Dec 2008 06:07:47 -0500
Subject: [PATCH 1/9] 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>
---
| 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
--git a/scripts/headers_install.pl b/scripts/headers_install.pl
index b89ca2c..050f49c 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 OUTFILE "%s", $line;
}
close OUTFILE;
--
1.7.0
1.1 src/patchsets/gentoo-headers/2.6.33/0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch?rev=1.1&content-type=text/plain
Index: 0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch
===================================================================
From 071663dfcd9d206f3b6482fcd44bf4eeb1730b7f Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 29 Dec 2008 06:51:45 -0500
Subject: [PATCH 2/9] linux/types.h: create userspace safe 64bit aligned defines
Some kernel headers exported to userspace rely on these 64bit aligned
defines. However, they are hidden behind __KERNEL_STRICT_NAMES at the
moment which means most of the time, they're never actually available.
These these defines dont actually conflict with normal userspace / C
library types, there's no reason to hide them behind the
__KERNEL_STRICT_NAMES define.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Patrick McHardy <kaber@trash.net>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/if_ppp.h | 16 ++++++++--------
include/linux/netfilter/nfnetlink_log.h | 4 ++--
include/linux/netfilter/nfnetlink_queue.h | 4 ++--
include/linux/netfilter/xt_connbytes.h | 4 ++--
include/linux/netfilter/xt_quota.h | 2 +-
include/linux/types.h | 14 +++++++++-----
6 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
index fcef103..c9ad383 100644
--- a/include/linux/if_ppp.h
+++ b/include/linux/if_ppp.h
@@ -114,14 +114,14 @@ struct pppol2tp_ioc_stats {
__u16 tunnel_id; /* redundant */
__u16 session_id; /* if zero, get tunnel stats */
__u32 using_ipsec:1; /* valid only for session_id == 0 */
- aligned_u64 tx_packets;
- aligned_u64 tx_bytes;
- aligned_u64 tx_errors;
- aligned_u64 rx_packets;
- aligned_u64 rx_bytes;
- aligned_u64 rx_seq_discards;
- aligned_u64 rx_oos_packets;
- aligned_u64 rx_errors;
+ __aligned_u64 tx_packets;
+ __aligned_u64 tx_bytes;
+ __aligned_u64 tx_errors;
+ __aligned_u64 rx_packets;
+ __aligned_u64 rx_bytes;
+ __aligned_u64 rx_seq_discards;
+ __aligned_u64 rx_oos_packets;
+ __aligned_u64 rx_errors;
};
#define ifr__name b.ifr_ifrn.ifrn_name
diff --git a/include/linux/netfilter/nfnetlink_log.h b/include/linux/netfilter/nfnetlink_log.h
index d3bab7a..1c37f87 100644
--- a/include/linux/netfilter/nfnetlink_log.h
+++ b/include/linux/netfilter/nfnetlink_log.h
@@ -28,8 +28,8 @@ struct nfulnl_msg_packet_hw {
};
struct nfulnl_msg_packet_timestamp {
- aligned_be64 sec;
- aligned_be64 usec;
+ __aligned_be64 sec;
+ __aligned_be64 usec;
};
enum nfulnl_attr_type {
diff --git a/include/linux/netfilter/nfnetlink_queue.h b/include/linux/netfilter/nfnetlink_queue.h
index 2455fe5..af94e00 100644
--- a/include/linux/netfilter/nfnetlink_queue.h
+++ b/include/linux/netfilter/nfnetlink_queue.h
@@ -25,8 +25,8 @@ struct nfqnl_msg_packet_hw {
};
struct nfqnl_msg_packet_timestamp {
- aligned_be64 sec;
- aligned_be64 usec;
+ __aligned_be64 sec;
+ __aligned_be64 usec;
};
enum nfqnl_attr_type {
diff --git a/include/linux/netfilter/xt_connbytes.h b/include/linux/netfilter/xt_connbytes.h
index 92fcbb0..f1d6c15 100644
--- a/include/linux/netfilter/xt_connbytes.h
+++ b/include/linux/netfilter/xt_connbytes.h
@@ -17,8 +17,8 @@ enum xt_connbytes_direction {
struct xt_connbytes_info {
struct {
- aligned_u64 from; /* count to be matched */
- aligned_u64 to; /* count to be matched */
+ __aligned_u64 from; /* count to be matched */
+ __aligned_u64 to; /* count to be matched */
} count;
__u8 what; /* ipt_connbytes_what */
__u8 direction; /* ipt_connbytes_direction */
diff --git a/include/linux/netfilter/xt_quota.h b/include/linux/netfilter/xt_quota.h
index 8dc89df..417ab17 100644
--- a/include/linux/netfilter/xt_quota.h
+++ b/include/linux/netfilter/xt_quota.h
@@ -13,7 +13,7 @@ struct xt_quota_info {
u_int32_t pad;
/* Used internally by the kernel */
- aligned_u64 quota;
+ __aligned_u64 quota;
struct xt_quota_priv *master;
};
diff --git a/include/linux/types.h b/include/linux/types.h
index c42724f..7a13ab4 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -118,11 +118,6 @@ typedef __u64 u_int64_t;
typedef __s64 int64_t;
#endif
-/* this is a special 64bit data type that is 8-byte aligned */
-#define aligned_u64 __u64 __attribute__((aligned(8)))
-#define aligned_be64 __be64 __attribute__((aligned(8)))
-#define aligned_le64 __le64 __attribute__((aligned(8)))
-
/**
* The type used for indexing onto a disc or disc partition.
*
@@ -147,8 +142,17 @@ typedef unsigned long blkcnt_t;
#define pgoff_t unsigned long
#endif
+#define aligned_u64 __aligned_u64
+#define aligned_be64 __aligned_be64
+#define aligned_le64 __aligned_le64
+
#endif /* __KERNEL__ */
+/* this is a special 64bit data type that is 8-byte aligned */
+#define __aligned_u64 __u64 __attribute__((aligned(8)))
+#define __aligned_be64 __be64 __attribute__((aligned(8)))
+#define __aligned_le64 __le64 __attribute__((aligned(8)))
+
/*
* Below are truly Linux-specific types that should never collide with
* any application/library that wants linux/types.h.
--
1.7.0
1.1 src/patchsets/gentoo-headers/2.6.33/0003-linux-stat.h-remove-__GLIBC__-checks.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0003-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0003-linux-stat.h-remove-__GLIBC__-checks.patch?rev=1.1&content-type=text/plain
Index: 0003-linux-stat.h-remove-__GLIBC__-checks.patch
===================================================================
From 24628fd228d960a8ef4659634d76fe2f0559f9a4 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 29 Dec 2008 06:52:59 -0500
Subject: [PATCH 3/9] 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.0
1.1 src/patchsets/gentoo-headers/2.6.33/0004-linux-stddef.h-export-offsetof-to-userspace.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0004-linux-stddef.h-export-offsetof-to-userspace.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0004-linux-stddef.h-export-offsetof-to-userspace.patch?rev=1.1&content-type=text/plain
Index: 0004-linux-stddef.h-export-offsetof-to-userspace.patch
===================================================================
From cd44f09a52abe440cfb2cbfd03f8ea35565f8750 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Fri, 2 Jan 2009 02:34:03 -0500
Subject: [PATCH 4/9] 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.0
1.1 src/patchsets/gentoo-headers/2.6.33/0005-linux-pull-in-other-needed-headers-for-userspace.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0005-linux-pull-in-other-needed-headers-for-userspace.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0005-linux-pull-in-other-needed-headers-for-userspace.patch?rev=1.1&content-type=text/plain
Index: 0005-linux-pull-in-other-needed-headers-for-userspace.patch
===================================================================
From 6d6783d9538acaab2abd45e9f210a30bf62aee36 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 29 Dec 2008 07:41:01 -0500
Subject: [PATCH 5/9] linux/*: pull in other needed headers for userspace
mondo patch
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/linux/atalk.h | 1 +
include/linux/atm_zatm.h | 1 +
include/linux/cm4000_cs.h | 1 +
include/linux/dn.h | 1 +
include/linux/elfcore.h | 1 -
include/linux/ext2_fs.h | 1 +
include/linux/hdlc/ioctl.h | 1 +
include/linux/if_ppp.h | 2 ++
include/linux/if_pppol2tp.h | 3 ---
include/linux/if_tunnel.h | 5 ++---
include/linux/ipv6_route.h | 1 +
include/linux/irda.h | 1 +
include/linux/isdn_divertif.h | 1 +
include/linux/llc.h | 4 ++++
include/linux/netrom.h | 2 ++
include/linux/nfsd/syscall.h | 1 +
include/linux/romfs_fs.h | 2 ++
include/linux/rose.h | 3 +++
include/linux/scc.h | 1 +
include/linux/synclink.h | 1 +
include/linux/times.h | 1 +
include/linux/un.h | 2 ++
include/linux/x25.h | 1 +
23 files changed, 31 insertions(+), 7 deletions(-)
diff --git a/include/linux/atalk.h b/include/linux/atalk.h
index d34c187..a2ce5e7 100644
--- a/include/linux/atalk.h
+++ b/include/linux/atalk.h
@@ -3,6 +3,7 @@
#include <linux/types.h>
#include <asm/byteorder.h>
+#include <linux/socket.h>
/*
* AppleTalk networking structures
diff --git a/include/linux/atm_zatm.h b/include/linux/atm_zatm.h
index 10f0fa2..ca03fef 100644
--- a/include/linux/atm_zatm.h
+++ b/include/linux/atm_zatm.h
@@ -12,6 +12,7 @@
* sys/types.h for struct timeval
*/
+#include <linux/time.h>
#include <linux/atmapi.h>
#include <linux/atmioc.h>
diff --git a/include/linux/cm4000_cs.h b/include/linux/cm4000_cs.h
index 72bfefd..b179b68 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/elfcore.h b/include/linux/elfcore.h
index 00d6a68..69b6cfd 100644
--- a/include/linux/elfcore.h
+++ b/include/linux/elfcore.h
@@ -24,7 +24,6 @@ struct elf_siginfo
typedef elf_greg_t greg_t;
typedef elf_gregset_t gregset_t;
typedef elf_fpregset_t fpregset_t;
-typedef elf_fpxregset_t fpxregset_t;
#define NGREG ELF_NGREG
#endif
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/hdlc/ioctl.h b/include/linux/hdlc/ioctl.h
index 5839723..79c4ef8 100644
--- a/include/linux/hdlc/ioctl.h
+++ b/include/linux/hdlc/ioctl.h
@@ -1,6 +1,7 @@
#ifndef __HDLC_IOCTL_H__
#define __HDLC_IOCTL_H__
+#include <linux/if.h>
#define GENERIC_HDLC_VERSION 4 /* For synchronization with sethdlc utility */
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
index c9ad383..22ebbc1 100644
--- a/include/linux/if_ppp.h
+++ b/include/linux/if_ppp.h
@@ -35,6 +35,8 @@
#include <linux/types.h>
#include <linux/compiler.h>
+#include <linux/if.h>
+#include <linux/ppp_defs.h>
/*
* Packet sizes
diff --git a/include/linux/if_pppol2tp.h b/include/linux/if_pppol2tp.h
index c58baea..249cd3e 100644
--- a/include/linux/if_pppol2tp.h
+++ b/include/linux/if_pppol2tp.h
@@ -16,10 +16,7 @@
#define __LINUX_IF_PPPOL2TP_H
#include <linux/types.h>
-
-#ifdef __KERNEL__
#include <linux/in.h>
-#endif
/* Structure used to connect() the socket to a particular tunnel UDP
* socket.
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h
index 1822d63..55ce8a5 100644
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -2,11 +2,10 @@
#define _IF_TUNNEL_H_
#include <linux/types.h>
-
-#ifdef __KERNEL__
+#include <asm/byteorder.h>
+#include <linux/if.h>
#include <linux/ip.h>
#include <linux/in6.h>
-#endif
#define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)
#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h
index 1e7d8af..bee1e83 100644
--- a/include/linux/ipv6_route.h
+++ b/include/linux/ipv6_route.h
@@ -14,6 +14,7 @@
#define _LINUX_IPV6_ROUTE_H
#include <linux/types.h>
+#include <linux/in6.h>
#define RTF_DEFAULT 0x00010000 /* default - learned via ND */
#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed)
diff --git a/include/linux/irda.h b/include/linux/irda.h
index 00bdad0..6ca2cf6 100644
--- a/include/linux/irda.h
+++ b/include/linux/irda.h
@@ -26,6 +26,7 @@
#define KERNEL_IRDA_H
#include <linux/types.h>
+#include <linux/socket.h>
/* Please do *not* add any #include in this file, this file is
* included as-is in user space.
diff --git a/include/linux/isdn_divertif.h b/include/linux/isdn_divertif.h
index 07821ca..363ab57 100644
--- a/include/linux/isdn_divertif.h
+++ b/include/linux/isdn_divertif.h
@@ -10,6 +10,7 @@
*
*/
+#include <linux/types.h>
/***********************************************************/
/* magic value is also used to control version information */
diff --git a/include/linux/llc.h b/include/linux/llc.h
index 7733585..64ac7ed 100644
--- a/include/linux/llc.h
+++ b/include/linux/llc.h
@@ -12,6 +12,10 @@
*
* See the GNU General Public License for more details.
*/
+
+#include <linux/if.h>
+#include <linux/socket.h>
+
#define __LLC_SOCK_SIZE__ 16 /* sizeof(sockaddr_llc), word align. */
struct sockaddr_llc {
sa_family_t sllc_family; /* AF_LLC */
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/nfsd/syscall.h b/include/linux/nfsd/syscall.h
index 812bc1e..10c5cd2 100644
--- a/include/linux/nfsd/syscall.h
+++ b/include/linux/nfsd/syscall.h
@@ -10,6 +10,7 @@
#define NFSD_SYSCALL_H
#include <linux/types.h>
+#include <linux/in.h>
#include <linux/nfsd/export.h>
/*
diff --git a/include/linux/romfs_fs.h b/include/linux/romfs_fs.h
index c490fbc..2a0269a 100644
--- a/include/linux/romfs_fs.h
+++ b/include/linux/romfs_fs.h
@@ -1,6 +1,8 @@
#ifndef __LINUX_ROMFS_FS_H
#define __LINUX_ROMFS_FS_H
+#include <linux/types.h>
+
/* The basic structures of the romfs filesystem */
#define ROMBSIZE BLOCK_SIZE
diff --git a/include/linux/rose.h b/include/linux/rose.h
index c7b4b18..5bcbba1 100644
--- a/include/linux/rose.h
+++ b/include/linux/rose.h
@@ -7,6 +7,9 @@
#ifndef ROSE_KERNEL_H
#define ROSE_KERNEL_H
+#include <linux/socket.h>
+#include <linux/ax25.h>
+
#define ROSE_MTU 251
#define ROSE_MAX_DIGIS 6
diff --git a/include/linux/scc.h b/include/linux/scc.h
index 3495bd9..d5916e5 100644
--- a/include/linux/scc.h
+++ b/include/linux/scc.h
@@ -3,6 +3,7 @@
#ifndef _SCC_H
#define _SCC_H
+#include <linux/sockios.h>
/* selection of hardware types */
diff --git a/include/linux/synclink.h b/include/linux/synclink.h
index 0ff2779..a970311 100644
--- a/include/linux/synclink.h
+++ b/include/linux/synclink.h
@@ -11,6 +11,7 @@
#ifndef _SYNCLINK_H_
#define _SYNCLINK_H_
+
#define SYNCLINK_H_VERSION 3.6
#include <linux/types.h>
diff --git a/include/linux/times.h b/include/linux/times.h
index 87b6261..a449fd0 100644
--- a/include/linux/times.h
+++ b/include/linux/times.h
@@ -2,6 +2,7 @@
#define _LINUX_TIMES_H
#include <linux/types.h>
+#include <linux/time.h>
struct tms {
__kernel_clock_t tms_utime;
diff --git a/include/linux/un.h b/include/linux/un.h
index 45561c5..77371f5 100644
--- a/include/linux/un.h
+++ b/include/linux/un.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_UN_H
#define _LINUX_UN_H
+#include <linux/socket.h>
+
#define UNIX_PATH_MAX 108
struct sockaddr_un {
diff --git a/include/linux/x25.h b/include/linux/x25.h
index 6450a7f..eaceb8c 100644
--- a/include/linux/x25.h
+++ b/include/linux/x25.h
@@ -12,6 +12,7 @@
#define X25_KERNEL_H
#include <linux/types.h>
+#include <linux/socket.h>
#define SIOCX25GSUBSCRIP (SIOCPROTOPRIVATE + 0)
#define SIOCX25SSUBSCRIP (SIOCPROTOPRIVATE + 1)
--
1.7.0
1.1 src/patchsets/gentoo-headers/2.6.33/0006-HACK-asm-pull-in-C-library-headers.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0006-HACK-asm-pull-in-C-library-headers.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0006-HACK-asm-pull-in-C-library-headers.patch?rev=1.1&content-type=text/plain
Index: 0006-HACK-asm-pull-in-C-library-headers.patch
===================================================================
From a6230682eb43fbd07df06cdd6aad4ae23bc92966 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 29 Dec 2008 07:39:14 -0500
Subject: [PATCH 6/9] 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 +++++
include/asm-generic/siginfo.h | 5 ++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/fcntl.h b/include/asm-generic/fcntl.h
index fcd268c..aa54f91 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>
#define O_ACCMODE 00000003
diff --git a/include/asm-generic/siginfo.h b/include/asm-generic/siginfo.h
index 942d30b..cd9ed99 100644
--- a/include/asm-generic/siginfo.h
+++ b/include/asm-generic/siginfo.h
@@ -1,6 +1,10 @@
#ifndef _ASM_GENERIC_SIGINFO_H
#define _ASM_GENERIC_SIGINFO_H
+#ifndef __KERNEL__
+# include <signal.h>
+#else
+
#include <linux/compiler.h>
#include <linux/types.h>
@@ -275,7 +279,6 @@ typedef struct sigevent {
#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
#define sigev_notify_thread_id _sigev_un._tid
-#ifdef __KERNEL__
struct siginfo;
void do_schedule_next_timer(struct siginfo *info);
--
1.7.0
1.1 src/patchsets/gentoo-headers/2.6.33/0007-HACK-linux-pull-in-C-library-headers.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0007-HACK-linux-pull-in-C-library-headers.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0007-HACK-linux-pull-in-C-library-headers.patch?rev=1.1&content-type=text/plain
Index: 0007-HACK-linux-pull-in-C-library-headers.patch
===================================================================
From 584c46544ddd117735c630ec46e3a6f4c26d98fc Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 29 Dec 2008 07:40:08 -0500
Subject: [PATCH 7/9] HACK: linux/*: pull in C library headers
pull in the libc versions of these headers so that the proper userspace
defines/typedefs are utilized.
the trouble here is that some of the linux/ headers define structs that the
libc net/ headers define (like the if.h header). we cannot simply say
"your program should not include linux/if.h when using net/if.h" because some
of the other linux/ headers may correctly be utilized with net/if.h but they
correctly include linux/if.h. we also cannot say "just use the linux/ headers
and not the libc net/ headers" because the libc headers include more
definitions than its kernel equivalent.
since there is no obvious (at least to me) answer here, we hack the linux/
headers to simply pull in userspace headers and ignore the linux/ ones
completely. this seems to give a proper clean userspace experience.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
include/linux/cdrom.h | 3 ++
include/linux/if.h | 8 +++--
include/linux/in.h | 66 ++++++++++++++++++++++++++++++++++++++++-------
include/linux/in6.h | 11 +++----
include/linux/ip.h | 3 +-
include/linux/socket.h | 5 +++
include/linux/stat.h | 4 +++
include/linux/time.h | 11 +++++---
include/linux/types.h | 1 +
9 files changed, 88 insertions(+), 24 deletions(-)
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h
index 78e9047..e1b6ba8 100644
--- a/include/linux/cdrom.h
+++ b/include/linux/cdrom.h
@@ -12,6 +12,9 @@
#define _LINUX_CDROM_H
#include <linux/types.h>
+#ifndef __KERNEL__
+# include <limits.h>
+#endif
#include <asm/byteorder.h>
/*******************************************************
diff --git a/include/linux/if.h b/include/linux/if.h
index 3a9f410..12a59db 100644
--- a/include/linux/if.h
+++ b/include/linux/if.h
@@ -19,6 +19,8 @@
#ifndef _LINUX_IF_H
#define _LINUX_IF_H
+#include <net/if.h>
+
#include <linux/types.h> /* for "__kernel_caddr_t" et al */
#include <linux/socket.h> /* for "struct sockaddr" et al */
#include <linux/compiler.h> /* for "__user" et al */
@@ -126,7 +128,7 @@ enum {
* being very small might be worth keeping for clean configuration.
*/
-struct ifmap {
+struct __kernel_ifmap {
unsigned long mem_start;
unsigned long mem_end;
unsigned short base_addr;
@@ -160,7 +162,7 @@ struct if_settings {
* remainder may be interface specific.
*/
-struct ifreq {
+struct __kernel_ifreq {
#define IFHWADDRLEN 6
union
{
@@ -209,7 +211,7 @@ struct ifreq {
* must know all networks accessible).
*/
-struct ifconf {
+struct __kernel_ifconf {
int ifc_len; /* size of buffer */
union {
char __user *ifcu_buf;
diff --git a/include/linux/in.h b/include/linux/in.h
index b615649..93e0874 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -18,42 +18,88 @@
#ifndef _LINUX_IN_H
#define _LINUX_IN_H
+#include <netinet/in.h>
+
#include <linux/types.h>
#include <linux/socket.h>
/* Standard well-defined IP protocols. */
enum {
+#ifndef IPPROTO_IP
IPPROTO_IP = 0, /* Dummy protocol for TCP */
+#endif
+#ifndef IPPROTO_ICMP
IPPROTO_ICMP = 1, /* Internet Control Message Protocol */
+#endif
+#ifndef IPPROTO_IGMP
IPPROTO_IGMP = 2, /* Internet Group Management Protocol */
+#endif
+#ifndef IPPROTO_IPIP
IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */
+#endif
+#ifndef IPPROTO_TCP
IPPROTO_TCP = 6, /* Transmission Control Protocol */
+#endif
+#ifndef IPPROTO_EGP
IPPROTO_EGP = 8, /* Exterior Gateway Protocol */
+#endif
+#ifndef IPPROTO_PUP
IPPROTO_PUP = 12, /* PUP protocol */
+#endif
+#ifndef IPPROTO_UDP
IPPROTO_UDP = 17, /* User Datagram Protocol */
+#endif
+#ifndef IPPROTO_IDP
IPPROTO_IDP = 22, /* XNS IDP protocol */
+#endif
+#ifndef IPPROTO_DCCP
IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol */
+#endif
+#ifndef IPPROTO_RSVP
IPPROTO_RSVP = 46, /* RSVP protocol */
+#endif
+#ifndef IPPROTO_GRE
IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */
+#endif
+#ifndef IPPROTO_IPV6
IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */
+#endif
+#ifndef IPPROTO_ESP
IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */
+#endif
+#ifndef IPPROTO_AH
IPPROTO_AH = 51, /* Authentication Header protocol */
+#endif
+#ifndef IPPROTO_BEETPH
IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET */
+#endif
+#ifndef IPPROTO_PIM
IPPROTO_PIM = 103, /* Protocol Independent Multicast */
+#endif
+#ifndef IPPROTO_COMP
IPPROTO_COMP = 108, /* Compression Header protocol */
+#endif
+#ifndef IPPROTO_SCTP
IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */
+#endif
+#ifndef IPPROTO_UDPLITE
IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */
+#endif
+#ifndef IPPROTO_RAW
IPPROTO_RAW = 255, /* Raw IP packets */
+#endif
+#if 0
IPPROTO_MAX
+#endif
};
/* Internet address. */
-struct in_addr {
+struct __kernel_in_addr {
__be32 s_addr;
};
@@ -118,24 +164,24 @@ struct in_addr {
/* Request struct for multicast socket ops */
-struct ip_mreq {
+struct __kernel_ip_mreq {
struct in_addr imr_multiaddr; /* IP multicast address of group */
struct in_addr imr_interface; /* local IP address of interface */
};
-struct ip_mreqn {
+struct __kernel_ip_mreqn {
struct in_addr imr_multiaddr; /* IP multicast address of group */
struct in_addr imr_address; /* local IP address of interface */
int imr_ifindex; /* Interface index */
};
-struct ip_mreq_source {
+struct __kernel_ip_mreq_source {
__be32 imr_multiaddr;
__be32 imr_interface;
__be32 imr_sourceaddr;
};
-struct ip_msfilter {
+struct __kernel_ip_msfilter {
__be32 imsf_multiaddr;
__be32 imsf_interface;
__u32 imsf_fmode;
@@ -147,18 +193,18 @@ struct ip_msfilter {
(sizeof(struct ip_msfilter) - sizeof(__u32) \
+ (numsrc) * sizeof(__u32))
-struct group_req {
+struct __kernel_group_req {
__u32 gr_interface; /* interface index */
struct __kernel_sockaddr_storage gr_group; /* group address */
};
-struct group_source_req {
+struct __kernel_group_source_req {
__u32 gsr_interface; /* interface index */
struct __kernel_sockaddr_storage gsr_group; /* group address */
struct __kernel_sockaddr_storage gsr_source; /* source address */
};
-struct group_filter {
+struct __kernel_group_filter {
__u32 gf_interface; /* interface index */
struct __kernel_sockaddr_storage gf_group; /* multicast address */
__u32 gf_fmode; /* filter mode */
@@ -170,7 +216,7 @@ struct group_filter {
(sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \
+ (numsrc) * sizeof(struct __kernel_sockaddr_storage))
-struct in_pktinfo {
+struct __kernel_in_pktinfo {
int ipi_ifindex;
struct in_addr ipi_spec_dst;
struct in_addr ipi_addr;
@@ -178,7 +224,7 @@ struct in_pktinfo {
/* Structure describing an Internet (IP) socket address. */
#define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */
-struct sockaddr_in {
+struct __kernel_sockaddr_in {
sa_family_t sin_family; /* Address family */
__be16 sin_port; /* Port number */
struct in_addr sin_addr; /* Internet address */
diff --git a/include/linux/in6.h b/include/linux/in6.h
index bd55c6e..3f53b0f 100644
--- a/include/linux/in6.h
+++ b/include/linux/in6.h
@@ -21,21 +21,20 @@
#ifndef _LINUX_IN6_H
#define _LINUX_IN6_H
+#include <netinet/in.h>
+
#include <linux/types.h>
/*
* IPv6 address structure
*/
-struct in6_addr {
+struct __kernel_in6_addr {
union {
__u8 u6_addr8[16];
__be16 u6_addr16[8];
__be32 u6_addr32[4];
} in6_u;
-#define s6_addr in6_u.u6_addr8
-#define s6_addr16 in6_u.u6_addr16
-#define s6_addr32 in6_u.u6_addr32
};
/* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553
@@ -55,7 +54,7 @@ extern const struct in6_addr in6addr_linklocal_allrouters;
{ { { 0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,0,2 } } }
#endif
-struct sockaddr_in6 {
+struct __kernel_sockaddr_in6 {
unsigned short int sin6_family; /* AF_INET6 */
__be16 sin6_port; /* Transport layer port # */
__be32 sin6_flowinfo; /* IPv6 flow information */
@@ -63,7 +62,7 @@ struct sockaddr_in6 {
__u32 sin6_scope_id; /* scope id (new in RFC2553) */
};
-struct ipv6_mreq {
+struct __kernel_ipv6_mreq {
/* IPv6 multicast address of group */
struct in6_addr ipv6mr_multiaddr;
diff --git a/include/linux/ip.h b/include/linux/ip.h
index bd0a2a8..19619cc 100644
--- a/include/linux/ip.h
+++ b/include/linux/ip.h
@@ -16,6 +16,7 @@
*/
#ifndef _LINUX_IP_H
#define _LINUX_IP_H
+#include <netinet/ip.h>
#include <linux/types.h>
#include <asm/byteorder.h>
@@ -82,7 +83,7 @@
#define IPV4_BEET_PHMAXLEN 8
-struct iphdr {
+struct __kernel_iphdr {
#if defined(__LITTLE_ENDIAN_BITFIELD)
__u8 ihl:4,
version:4;
diff --git a/include/linux/socket.h b/include/linux/socket.h
index 7b3aae2..b261eaf 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -327,4 +327,9 @@ extern int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen
unsigned int flags, struct timespec *timeout);
#endif
#endif /* not kernel and not glibc */
+
+#ifndef __KERNEL__
+# include <sys/socket.h>
+#endif
+
#endif /* _LINUX_SOCKET_H */
diff --git a/include/linux/stat.h b/include/linux/stat.h
index 5460344..a90fdb2 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -77,4 +77,8 @@ struct kstat {
#endif
+#ifndef __KERNEL__
+# include <sys/stat.h>
+#endif
+
#endif
diff --git a/include/linux/time.h b/include/linux/time.h
index 6e026e4..ab8573e 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -1,13 +1,15 @@
#ifndef _LINUX_TIME_H
#define _LINUX_TIME_H
+#include <time.h>
+#include <sys/time.h>
+
#include <linux/types.h>
#ifdef __KERNEL__
# include <linux/cache.h>
# include <linux/seqlock.h>
# include <linux/math64.h>
-#endif
#ifndef _STRUCT_TIMESPEC
#define _STRUCT_TIMESPEC
@@ -27,8 +29,6 @@ struct timezone {
int tz_dsttime; /* type of dst correction */
};
-#ifdef __KERNEL__
-
extern struct timezone sys_tz;
/* Parameters used to convert the timespec values: */
@@ -238,7 +238,6 @@ static __always_inline void timespec_add_ns(struct timespec *a, u64 ns)
a->tv_sec += __iter_div_u64_rem(a->tv_nsec + ns, NSEC_PER_SEC, &ns);
a->tv_nsec = ns;
}
-#endif /* __KERNEL__ */
#define NFDBITS __NFDBITS
@@ -266,6 +265,8 @@ struct itimerval {
struct timeval it_value; /* current value */
};
+#endif /* __KERNEL__ */
+
/*
* The IDs of the various system clocks (for POSIX.1b interval timers):
*/
@@ -288,6 +289,8 @@ struct itimerval {
/*
* The various flags for setting POSIX.1b interval timers:
*/
+#ifndef TIMER_ABSTIME
#define TIMER_ABSTIME 0x01
+#endif
#endif
diff --git a/include/linux/types.h b/include/linux/types.h
index 7a13ab4..4b7caf6 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -11,6 +11,7 @@
#endif
+#include <sys/types.h>
#include <linux/posix_types.h>
#ifdef __KERNEL__
--
1.7.0
1.1 src/patchsets/gentoo-headers/2.6.33/0008-netfilter-pull-in-limits.h.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0008-netfilter-pull-in-limits.h.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0008-netfilter-pull-in-limits.h.patch?rev=1.1&content-type=text/plain
Index: 0008-netfilter-pull-in-limits.h.patch
===================================================================
From e6a187f2c679a9f080091fb36675da7bcacbf5ae Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 9 May 2009 17:30:35 -0400
Subject: [PATCH 8/9] 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 48c5496..5f5ffc9 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.0
1.1 src/patchsets/gentoo-headers/2.6.33/0009-convert-PAGE_SIZE-usage.patch
file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0009-convert-PAGE_SIZE-usage.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/gentoo-headers/2.6.33/0009-convert-PAGE_SIZE-usage.patch?rev=1.1&content-type=text/plain
Index: 0009-convert-PAGE_SIZE-usage.patch
===================================================================
From ec9ffd9d7370751f58c5436acb78866d20990801 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 13 Feb 2010 03:09:23 -0500
Subject: [PATCH 9/9] 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 89c6249..a6f97f7 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 f1e914e..4e0beaf 100644
--- a/include/linux/resource.h
+++ b/include/linux/resource.h
@@ -60,7 +60,8 @@ struct rlimit {
* 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.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-08 5:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-08 5:22 [gentoo-commits] gentoo commit in src/patchsets/gentoo-headers/2.6.33: 0001-kbuild-auto-convert-size-types-in-userspace-headers.patch 0002-linux-types.h-create-userspace-safe-64bit-aligned-de.patch 0003-linux-stat.h-remove-__GLIBC__-checks.patch 0004-linux-stddef.h-export-offsetof-to-userspace.patch 0005-linux-pull-in-other-needed-headers-for-userspace.patch 0006-HACK-asm-pull-in-C-library-headers.patch 0007-HACK-linux-pull-in-C-library-headers.patch 0008-netfilter-pull-in-limits.h.patch 0009-convert-PAGE_SIZE-usage.patch Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox