packages: linux-libc-headers/linux-libc-headers.spec, linux-libc-headers/li...

arekm arekm at pld-linux.org
Mon Jun 7 22:52:11 CEST 2010


Author: arekm                        Date: Mon Jun  7 20:52:11 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 2; align export for netfilter from git

---- Files affected:
packages/linux-libc-headers:
   linux-libc-headers.spec (1.158 -> 1.159) , linux-libc-headers-align.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/linux-libc-headers/linux-libc-headers.spec
diff -u packages/linux-libc-headers/linux-libc-headers.spec:1.158 packages/linux-libc-headers/linux-libc-headers.spec:1.159
--- packages/linux-libc-headers/linux-libc-headers.spec:1.158	Mon May 17 20:32:03 2010
+++ packages/linux-libc-headers/linux-libc-headers.spec	Mon Jun  7 22:52:06 2010
@@ -5,7 +5,7 @@
 Summary(pl.UTF-8):	Nagłówki jądra Linuksa do użytku z bibliotekami C
 Name:		linux-libc-headers
 Version:	%{basever}%{postver}
-Release:	1
+Release:	2
 Epoch:		7
 License:	GPL v2
 Group:		Development
@@ -26,6 +26,7 @@
 Patch6:		linux-kernel-headers.SuSE.TIOCGDEV.patch
 Patch7:		%{name}-atm-vbr.patch
 Patch8:		vserver.patch
+Patch9:		%{name}-align.patch
 AutoReqProv:	no
 BuildRequires:	perl-base
 BuildRequires:	rpmbuild(macros) >= 1.360
@@ -71,6 +72,7 @@
 %patch6 -p2
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -117,6 +119,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.159  2010/06/07 20:52:06  arekm
+- rel 2; align export for netfilter from git
+
 Revision 1.158  2010/05/17 18:32:03  qboosh
 - updated to 2.6.34
 

================================================================
Index: packages/linux-libc-headers/linux-libc-headers-align.patch
diff -u /dev/null packages/linux-libc-headers/linux-libc-headers-align.patch:1.1
--- /dev/null	Mon Jun  7 22:52:11 2010
+++ packages/linux-libc-headers/linux-libc-headers-align.patch	Mon Jun  7 22:52:06 2010
@@ -0,0 +1,74 @@
+commit a79ff731a1b277d0e92d9453bdf374e04cec717a
+Author: Alexey Dobriyan <adobriyan at gmail.com>
+Date:   Tue Apr 13 11:21:46 2010 +0200
+
+    netfilter: xtables: make XT_ALIGN() usable in exported headers by exporting __ALIGN_KERNEL()
+    
+    XT_ALIGN() was rewritten through ALIGN() by commit 42107f5009da223daa800d6da6904d77297ae829
+    "netfilter: xtables: symmetric COMPAT_XT_ALIGN definition".
+    ALIGN() is not exported in userspace headers, which created compile problem for tc(8)
+    and will create problem for iptables(8).
+    
+    We can't export generic looking name ALIGN() but we can export less generic
+    __ALIGN_KERNEL() (suggested by Ben Hutchings).
+    Google knows nothing about __ALIGN_KERNEL().
+    
+    COMPAT_XT_ALIGN() changed for symmetry.
+    
+    Reported-by: Andreas Henriksson <andreas at fatal.se>
+    Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
+    Signed-off-by: Patrick McHardy <kaber at trash.net>
+
+diff --git a/include/linux/kernel.h b/include/linux/kernel.h
+index 7f07074..284ea99 100644
+--- a/include/linux/kernel.h
++++ b/include/linux/kernel.h
+@@ -4,6 +4,8 @@
+ /*
+  * 'kernel.h' contains some often-used function prototypes etc
+  */
++#define __ALIGN_KERNEL(x, a)		__ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1)
++#define __ALIGN_KERNEL_MASK(x, mask)	(((x) + (mask)) & ~(mask))
+ 
+ #ifdef __KERNEL__
+ 
+@@ -37,8 +39,7 @@ extern const char linux_proc_banner[];
+ 
+ #define STACK_MAGIC	0xdeadbeef
+ 
+-#define ALIGN(x,a)		__ALIGN_MASK(x,(typeof(x))(a)-1)
+-#define __ALIGN_MASK(x,mask)	(((x)+(mask))&~(mask))
++#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))
+ #define PTR_ALIGN(p, a)		((typeof(p))ALIGN((unsigned long)(p), (a)))
+ #define IS_ALIGNED(x, a)		(((x) & ((typeof(x))(a) - 1)) == 0)
+ 
+diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
+index 1a65d45..26ced0c 100644
+--- a/include/linux/netfilter/x_tables.h
++++ b/include/linux/netfilter/x_tables.h
+@@ -1,6 +1,6 @@
+ #ifndef _X_TABLES_H
+ #define _X_TABLES_H
+-
++#include <linux/kernel.h>
+ #include <linux/types.h>
+ 
+ #define XT_FUNCTION_MAXNAMELEN 30
+@@ -93,7 +93,7 @@ struct _xt_align {
+ 	__u64 u64;
+ };
+ 
+-#define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align))
++#define XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _xt_align))
+ 
+ /* Standard return verdict, or do jump. */
+ #define XT_STANDARD_TARGET ""
+@@ -603,7 +603,7 @@ struct _compat_xt_align {
+ 	compat_u64 u64;
+ };
+ 
+-#define COMPAT_XT_ALIGN(s) ALIGN((s), __alignof__(struct _compat_xt_align))
++#define COMPAT_XT_ALIGN(s) __ALIGN_KERNEL((s), __alignof__(struct _compat_xt_align))
+ 
+ extern void xt_compat_lock(u_int8_t af);
+ extern void xt_compat_unlock(u_int8_t af);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/linux-libc-headers/linux-libc-headers.spec?r1=1.158&r2=1.159&f=u



More information about the pld-cvs-commit mailing list