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) {