summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-04-20 08:42:54 +0000
committerMike Frysinger <vapier@gentoo.org>2008-04-20 08:42:54 +0000
commit446016bbfa662db428a30fff196dfa17e3c59936 (patch)
treeacc478024a63a1110791caeb9eb4fe17d5ffcd34 /sys-apps/lshw
parentMore forced strip removing (diff)
downloadgentoo-2-446016bbfa662db428a30fff196dfa17e3c59936.tar.gz
gentoo-2-446016bbfa662db428a30fff196dfa17e3c59936.tar.bz2
gentoo-2-446016bbfa662db428a30fff196dfa17e3c59936.zip
Fix from upstream for alignment troubles on sparc #217783 by Friedrich Oslage.
(Portage version: 2.2_pre5)
Diffstat (limited to 'sys-apps/lshw')
-rw-r--r--sys-apps/lshw/ChangeLog6
-rw-r--r--sys-apps/lshw/files/lshw-02.12.01b-alignment.patch27
-rw-r--r--sys-apps/lshw/lshw-02.12.01b.ebuild3
3 files changed, 34 insertions, 2 deletions
diff --git a/sys-apps/lshw/ChangeLog b/sys-apps/lshw/ChangeLog
index 7add8eb2b9d9..884bdc5a3170 100644
--- a/sys-apps/lshw/ChangeLog
+++ b/sys-apps/lshw/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/lshw
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/ChangeLog,v 1.64 2008/04/20 08:35:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/ChangeLog,v 1.65 2008/04/20 08:42:54 vapier Exp $
+
+ 20 Apr 2008; Mike Frysinger <vapier@gentoo.org>
+ +files/lshw-02.12.01b-alignment.patch, lshw-02.12.01b.ebuild:
+ Fix from upstream for alignment troubles on sparc #217783 by Friedrich Oslage.
20 Apr 2008; Mike Frysinger <vapier@gentoo.org>
+files/lshw-02.12.01b-gcc43.patch, lshw-02.12.01b.ebuild:
diff --git a/sys-apps/lshw/files/lshw-02.12.01b-alignment.patch b/sys-apps/lshw/files/lshw-02.12.01b-alignment.patch
new file mode 100644
index 000000000000..c1dbae83810a
--- /dev/null
+++ b/sys-apps/lshw/files/lshw-02.12.01b-alignment.patch
@@ -0,0 +1,27 @@
+fix from upstream for alignment errors
+
+http://ezix.org/project/changeset?new=packages/lshw/development/src/core/scsi.cc%401927&old=packages/lshw/development/src/core/scsi.cc%401923
+
+--- src/core/scsi.cc
++++ src/core/scsi.cc
+@@ -566,11 +566,15 @@
+ if (fd >= 0)
+ {
+ int bus = -1;
+- char host[50];
+- int * length = (int*)host;
+- *length = sizeof(host);
+- memset(host, 0, sizeof(host));
+- if (ioctl(fd, SCSI_IOCTL_PROBE_HOST, &host) >= 0)
++ union
++ {
++ char host[50];
++ int length;
++ } tmp;
++ tmp.length = sizeof(tmp.host);
++ memset(tmp.host, 0, sizeof(tmp.host));
++
++ if(ioctl(fd, SCSI_IOCTL_PROBE_HOST, &tmp.length) >= 0)
+ {
+ if (ioctl(fd, SCSI_IOCTL_GET_BUS_NUMBER, &bus) >= 0)
+ {
diff --git a/sys-apps/lshw/lshw-02.12.01b.ebuild b/sys-apps/lshw/lshw-02.12.01b.ebuild
index 75eeb752f951..9aa8d3dd764b 100644
--- a/sys-apps/lshw/lshw-02.12.01b.ebuild
+++ b/sys-apps/lshw/lshw-02.12.01b.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/lshw-02.12.01b.ebuild,v 1.5 2008/04/20 08:35:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/lshw/lshw-02.12.01b.ebuild,v 1.6 2008/04/20 08:42:54 vapier Exp $
inherit flag-o-matic eutils toolchain-funcs
@@ -29,6 +29,7 @@ src_unpack() {
epatch "${FILESDIR}"/${PN}-02.12.01b-build.patch
epatch "${FILESDIR}"/${PN}-02.09b-cpuid-PIC.patch #61947
epatch "${FILESDIR}"/${P}-gcc43.patch #213912
+ epatch "${FILESDIR}"/${P}-alignment.patch #217783
}
src_compile() {