summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-10-31 07:43:51 +0000
committerMike Frysinger <vapier@gentoo.org>2006-10-31 07:43:51 +0000
commitf3e5ac6d57abc1ffbb87ea0d2362c6851776f6ac (patch)
tree88754da86990a096dab0b2dd0f9a084d1c01bd69 /sys-apps/util-linux
parentAdd ~x86-fbsd keyword. (diff)
downloadgentoo-2-f3e5ac6d57abc1ffbb87ea0d2362c6851776f6ac.tar.gz
gentoo-2-f3e5ac6d57abc1ffbb87ea0d2362c6851776f6ac.tar.bz2
gentoo-2-f3e5ac6d57abc1ffbb87ea0d2362c6851776f6ac.zip
Fix building with linux-headers-2.6.18+ as _syscall#() no longer exists #150852 by Mario Fetka.
(Portage version: 2.1.2_rc1-r1)
Diffstat (limited to 'sys-apps/util-linux')
-rw-r--r--sys-apps/util-linux/ChangeLog7
-rw-r--r--sys-apps/util-linux/files/util-linux-2.12r-no-_syscall.patch53
-rw-r--r--sys-apps/util-linux/util-linux-2.12r-r5.ebuild4
3 files changed, 62 insertions, 2 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog
index 39b272b44be4..e3e75f97173f 100644
--- a/sys-apps/util-linux/ChangeLog
+++ b/sys-apps/util-linux/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/util-linux
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.169 2006/10/28 22:37:36 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.170 2006/10/31 07:43:50 vapier Exp $
+
+ 31 Oct 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/util-linux-2.12r-no-_syscall.patch, util-linux-2.12r-r5.ebuild:
+ Fix building with linux-headers-2.6.18+ as _syscall#() no longer exists
+ #150852 by Mario Fetka.
*util-linux-2.12r-r5 (28 Oct 2006)
diff --git a/sys-apps/util-linux/files/util-linux-2.12r-no-_syscall.patch b/sys-apps/util-linux/files/util-linux-2.12r-no-_syscall.patch
new file mode 100644
index 000000000000..fb5ab38b62b7
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.12r-no-_syscall.patch
@@ -0,0 +1,53 @@
+newer kernel headers stop exporting _syscall#() macro's, so let's insert
+some workarounds to handle this ...
+
+util-linux-2.13 doesnt use _syscall#() anymore
+
+http://bugs.gentoo.org/150852
+
+--- lib/my-syscall.h
++++ lib/my-syscall.h
+@@ -0,0 +1,12 @@
++#ifndef __MY_SYSCALL_H__
++#define __MY_SYSCALL_H__
++
++#ifndef _syscall5
++# define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
++type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \
++{ \
++ return (type) syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5); \
++}
++#endif
++
++#endif
+--- fdisk/llseek.c
++++ fdisk/llseek.c
+@@ -10,6 +10,8 @@
+ #include <errno.h>
+ #include <unistd.h>
+
++#include "my-syscall.h"
++
+ extern long long ext2_llseek (unsigned int, long long, unsigned int);
+
+ #ifdef __linux__
+--- fdisk/sfdisk.c
++++ fdisk/sfdisk.c
+@@ -177,6 +177,7 @@
+ #endif
+
+ #ifndef use_lseek
++#include <my-syscall.h>
+ static __attribute__used
+ _syscall5(int, _llseek, unsigned int, fd, ulong, hi, ulong, lo,
+ loff_t *, res, unsigned int, wh);
+--- partx/partx.c
++++ partx/partx.c
+@@ -339,6 +339,7 @@
+
+ #ifdef NEED__llseek
+ #include <linux/unistd.h> /* _syscall */
++#include "../lib/my-syscall.h"
+ static
+ _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
+ long long *, res, uint, wh);
diff --git a/sys-apps/util-linux/util-linux-2.12r-r5.ebuild b/sys-apps/util-linux/util-linux-2.12r-r5.ebuild
index a2b1dfbaff24..cabc8be4e064 100644
--- a/sys-apps/util-linux/util-linux-2.12r-r5.ebuild
+++ b/sys-apps/util-linux/util-linux-2.12r-r5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12r-r5.ebuild,v 1.1 2006/10/28 22:37:36 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.12r-r5.ebuild,v 1.2 2006/10/31 07:43:50 vapier Exp $
inherit eutils flag-o-matic toolchain-funcs
@@ -117,6 +117,8 @@ src_unpack() {
# fix mips n32 (no llseek syscall)
epatch "${FILESDIR}"/${PN}-2.12-mips-lseek.patch
+ epatch "${FILESDIR}"/${PN}-2.12r-no-_syscall.patch #150852
+
# Enable random features
local mconfigs="MCONFIG"
use old-crypt && mconfigs="${mconfigs} ${OLD_CRYPT_P}/MCONFIG"