summaryrefslogtreecommitdiff
path: root/sysutils/smartmontools/patches
diff options
context:
space:
mode:
authormartin <martin@pkgsrc.org>2006-09-24 17:14:55 +0000
committermartin <martin@pkgsrc.org>2006-09-24 17:14:55 +0000
commit23523cc06ff2471bed7005739d6f4c6ed9b6cfc6 (patch)
tree14fc796b919fd72f811cc0bf7aa4519b09f2c533 /sysutils/smartmontools/patches
parentd2a3b6384c9a32d60f2bc855250c8ba54e746d83 (diff)
downloadpkgsrc-23523cc06ff2471bed7005739d6f4c6ed9b6cfc6.tar.gz
Fix this for little endian args
Diffstat (limited to 'sysutils/smartmontools/patches')
-rw-r--r--sysutils/smartmontools/patches/patch-ab21
1 files changed, 21 insertions, 0 deletions
diff --git a/sysutils/smartmontools/patches/patch-ab b/sysutils/smartmontools/patches/patch-ab
new file mode 100644
index 00000000000..8dd08035d59
--- /dev/null
+++ b/sysutils/smartmontools/patches/patch-ab
@@ -0,0 +1,21 @@
+$NetBSD: patch-ab,v 1.8 2006/09/24 17:14:55 martin Exp $
+
+--- ataprint.c.orig 2006-04-12 16:54:28.000000000 +0200
++++ ataprint.c 2006-09-24 18:47:09.000000000 +0200
+@@ -95,11 +95,12 @@
+ char tmp[65];
+
+ n = n > 64 ? 64 : n;
+-#ifndef __NetBSD__
+- swapbytes(tmp, in, n);
+-#else
+- strncpy(tmp, in, n); /* NetBSD delivers host byte order strings */
++#ifdef __NetBSD__
++ if (isbigendian())
++ strncpy(tmp, in, n);
++ else
+ #endif
++ swapbytes(tmp, in, n);
+ tmp[n] = '\0';
+ trim(out, tmp);
+ }