diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-04-20 08:42:54 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-04-20 08:42:54 +0000 |
commit | 446016bbfa662db428a30fff196dfa17e3c59936 (patch) | |
tree | acc478024a63a1110791caeb9eb4fe17d5ffcd34 /sys-apps/lshw/files | |
parent | More forced strip removing (diff) | |
download | gentoo-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/files')
-rw-r--r-- | sys-apps/lshw/files/lshw-02.12.01b-alignment.patch | 27 |
1 files changed, 27 insertions, 0 deletions
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) + { |