diff options
author | Mike Frysinger <vapier@gentoo.org> | 2003-12-11 21:53:03 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2003-12-11 21:53:03 +0000 |
commit | b3feb20f44582a2512bff0acf1a7ef7ff3d58639 (patch) | |
tree | a9d150dce9d291c72ac41f6e08b911b9947bdcc3 /sys-apps/util-linux | |
parent | masking xchat 2.0.6 (diff) | |
download | gentoo-2-b3feb20f44582a2512bff0acf1a7ef7ff3d58639.tar.gz gentoo-2-b3feb20f44582a2512bff0acf1a7ef7ff3d58639.tar.bz2 gentoo-2-b3feb20f44582a2512bff0acf1a7ef7ff3d58639.zip |
2.6.x patch
Diffstat (limited to 'sys-apps/util-linux')
-rw-r--r-- | sys-apps/util-linux/ChangeLog | 5 | ||||
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.12-kernel-2.6.patch | 87 | ||||
-rw-r--r-- | sys-apps/util-linux/util-linux-2.12-r3.ebuild | 5 |
3 files changed, 95 insertions, 2 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog index 90c2d553d11c..62fb40c471c5 100644 --- a/sys-apps/util-linux/ChangeLog +++ b/sys-apps/util-linux/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-apps/util-linux # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.62 2003/12/08 11:52:46 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.63 2003/12/11 21:53:03 vapier Exp $ + + 11 Dec 2003; Mike Frysinger <vapier@gentoo.org> util-linux-2.12-r3.ebuild : + Add patch to compile against 2.6.x headers #31286. *util-linux-2.11z-r9 (06 Dec 2003) diff --git a/sys-apps/util-linux/files/util-linux-2.12-kernel-2.6.patch b/sys-apps/util-linux/files/util-linux-2.12-kernel-2.6.patch new file mode 100644 index 000000000000..3f03c5568f4a --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.12-kernel-2.6.patch @@ -0,0 +1,87 @@ +diff -ruN util-linux-2.12.orig/disk-utils/blockdev.c util-linux-2.12/disk-utils/blockdev.c +--- util-linux-2.12.orig/disk-utils/blockdev.c 2002-03-08 23:57:02.000000000 +0100 ++++ util-linux-2.12/disk-utils/blockdev.c 2003-10-16 18:26:53.048373136 +0200 +@@ -9,6 +9,7 @@ + #include <string.h> + #include <unistd.h> + #include <sys/ioctl.h> ++#include <linux/version.h> + + #include "nls.h" + +@@ -24,8 +25,13 @@ + #define BLKRASET _IO(0x12,98) + #define BLKRAGET _IO(0x12,99) + #define BLKSSZGET _IO(0x12,104) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define BLKBSZGET _IOR(0x12,112,sizeof(int)) + #define BLKBSZSET _IOW(0x12,113,sizeof(int)) ++#else ++#define BLKBSZGET _IOR(0x12,112,int) ++#define BLKBSZSET _IOW(0x12,113,int) ++#endif + #endif + + /* Maybe <linux/hdreg.h> could be included */ +diff -ruN util-linux-2.12.orig/disk-utils/elvtune.c util-linux-2.12/disk-utils/elvtune.c +--- util-linux-2.12.orig/disk-utils/elvtune.c 2002-03-08 23:57:49.000000000 +0100 ++++ util-linux-2.12/disk-utils/elvtune.c 2003-10-16 18:26:53.048373136 +0200 +@@ -26,6 +26,8 @@ + #include <sys/ioctl.h> + #include <unistd.h> + #include <stdlib.h> ++#include <linux/version.h> ++ + #include "nls.h" + + /* this has to match with the kernel structure */ +@@ -37,8 +39,13 @@ + int max_bomb_segments; + } blkelv_ioctl_arg_t; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define BLKELVGET _IOR(0x12,106,sizeof(blkelv_ioctl_arg_t)) + #define BLKELVSET _IOW(0x12,107,sizeof(blkelv_ioctl_arg_t)) ++#else ++#define BLKELVGET _IOR(0x12,106,blkelv_ioctl_arg_t) ++#define BLKELVSET _IOW(0x12,107,blkelv_ioctl_arg_t) ++#endif + + static void + usage(void) { +diff -ruN util-linux-2.12.orig/fdisk/common.h util-linux-2.12/fdisk/common.h +--- util-linux-2.12.orig/fdisk/common.h 2003-07-13 15:59:53.000000000 +0200 ++++ util-linux-2.12/fdisk/common.h 2003-10-16 18:29:11.365345760 +0200 +@@ -2,11 +2,18 @@ + + /* including <linux/fs.h> fails */ + #include <sys/ioctl.h> ++#include <linux/version.h> ++ + #define BLKRRPART _IO(0x12,95) /* re-read partition table */ + #define BLKGETSIZE _IO(0x12,96) /* return device size */ + #define BLKFLSBUF _IO(0x12,97) /* flush buffer cache */ + #define BLKSSZGET _IO(0x12,104) /* get block device sector size */ ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define BLKGETSIZE64 _IOR(0x12,114,8) /* 8 = sizeof(u64) */ ++#else ++#define BLKGETSIZE64 _IOR(0x12,114,unsigned long long) ++#endif + + /* including <linux/hdreg.h> also fails */ + struct hd_geometry { +diff -ruN util-linux-2.12.orig/mount/my_dev_t.h util-linux-2.12/mount/my_dev_t.h +--- util-linux-2.12.orig/mount/my_dev_t.h 2003-07-16 22:05:50.000000000 +0200 ++++ util-linux-2.12/mount/my_dev_t.h 2003-10-16 18:26:53.049372984 +0200 +@@ -4,4 +4,10 @@ + /* for ancient systems use "unsigned short" */ + + #include <linux/posix_types.h> ++#include <linux/version.h> ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) + #define my_dev_t __kernel_dev_t ++#else ++#define my_dev_t int ++#endif diff --git a/sys-apps/util-linux/util-linux-2.12-r3.ebuild b/sys-apps/util-linux/util-linux-2.12-r3.ebuild index 199994b5d0b2..95aefe056e82 100644 --- a/sys-apps/util-linux/util-linux-2.12-r3.ebuild +++ b/sys-apps/util-linux/util-linux-2.12-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12-r3.ebuild,v 1.1 2003/12/08 11:52:46 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12-r3.ebuild,v 1.2 2003/12/11 21:53:03 vapier Exp $ IUSE="crypt nls static pam selinux" @@ -80,6 +80,9 @@ src_unpack() { # objects. "prelink" should now also be able to take advantage epatch ${FILESDIR}/${PN}-2.11z-pic.patch + # allow util-linux to compile with 2.6.x headers #31286 + epatch ${FILESDIR}/${P}-kernel-2.6.patch + #enable pam only if we use it use pam && sed -i "s:HAVE_PAM=no:HAVE_PAM=yes:" MCONFIG |