diff options
author | mrg <mrg@pkgsrc.org> | 2015-11-10 08:52:38 +0000 |
---|---|---|
committer | mrg <mrg@pkgsrc.org> | 2015-11-10 08:52:38 +0000 |
commit | 9558a55a7b8ff99f4bdef1e8779ab942d2d18560 (patch) | |
tree | 6503450e2d9484d01789d08ea1ad337e1eebe936 | |
parent | 33d59c308fbc4993b1ed0e6917b9b6b69c98500e (diff) | |
download | pkgsrc-9558a55a7b8ff99f4bdef1e8779ab942d2d18560.tar.gz |
s/long// (leaving "unsigned") in some code that fails when long is
anything but 32 bits (and unsigned is 32 bits in pretty much all
modern platforms.)
this allows ups-nut-usb to work on sparc64 for me, otherwise the
hidparser fails.
bump pkg revision for ups-nut-usb, as that pkg changes (at least
for big endian platforms.)
-rw-r--r-- | sysutils/ups-nut-usb/Makefile | 3 | ||||
-rw-r--r-- | sysutils/ups-nut/distinfo | 3 | ||||
-rw-r--r-- | sysutils/ups-nut/patches/patch-drivers_hidparser.c | 17 |
3 files changed, 21 insertions, 2 deletions
diff --git a/sysutils/ups-nut-usb/Makefile b/sysutils/ups-nut-usb/Makefile index 6cf448786e0..7d1edf044ba 100644 --- a/sysutils/ups-nut-usb/Makefile +++ b/sysutils/ups-nut-usb/Makefile @@ -1,8 +1,9 @@ -# $NetBSD: Makefile,v 1.4 2012/10/23 19:51:28 asau Exp $ +# $NetBSD: Makefile,v 1.5 2015/11/10 08:52:38 mrg Exp $ .include "../../sysutils/ups-nut/Makefile.common" PKGNAME= ${DISTNAME:S/nut/ups-nut-usb/} +PKGREVISION= 1 COMMENT= Network UPS Tools USB drivers DEPENDS+= ups-nut-2.*:../../sysutils/ups-nut diff --git a/sysutils/ups-nut/distinfo b/sysutils/ups-nut/distinfo index 67c06ebe56f..64f9872e2f0 100644 --- a/sysutils/ups-nut/distinfo +++ b/sysutils/ups-nut/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.29 2015/11/04 01:32:34 agc Exp $ +$NetBSD: distinfo,v 1.30 2015/11/10 08:52:38 mrg Exp $ SHA1 (nut-2.6.5.tar.gz) = 320debe11df91f04e32824694d0c89a020677f71 RMD160 (nut-2.6.5.tar.gz) = d6e6acd4696e3c3f8c0ecd998f8676a8625decb9 @@ -6,3 +6,4 @@ SHA512 (nut-2.6.5.tar.gz) = f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7 Size (nut-2.6.5.tar.gz) = 2038832 bytes SHA1 (patch-aa) = 48110f378518edb43a653753eb4ef6ea28344c62 SHA1 (patch-ab) = 44988118570714ab2c3fffdd75909c2255b94fa6 +SHA1 (patch-drivers_hidparser.c) = c71d84bbf3140db1f82ef155fdf5afec79cbd38d diff --git a/sysutils/ups-nut/patches/patch-drivers_hidparser.c b/sysutils/ups-nut/patches/patch-drivers_hidparser.c new file mode 100644 index 00000000000..8b61c909c9d --- /dev/null +++ b/sysutils/ups-nut/patches/patch-drivers_hidparser.c @@ -0,0 +1,17 @@ +$NetBSD: patch-drivers_hidparser.c,v 1.1 2015/11/10 08:52:38 mrg Exp $ + +work around horrible big-endian code that assumes "long" is 32 bits. +enables usb-nut-ups to work on sparc64. + + +--- drivers/hidparser.c.orig 2012-07-31 10:38:59.000000000 -0700 ++++ drivers/hidparser.c 2015-11-10 00:30:11.000000000 -0800 +@@ -163,7 +163,7 @@ + #if WORDS_BIGENDIAN + { + int i; +- unsigned long valTmp = 0; ++ unsigned valTmp = 0; + + for (i = 0; i < ItemSize[pParser->Item & SIZE_MASK]; i++) { + memcpy(&valTmp, &pParser->ReportDesc[(pParser->Pos)+i], 1); |