tags 746616 + patch
thanks
diff -urpN lshw-02.16.orig/debian/patches/fix-645-endianness-problem-in-dev-tree-parsing.patch lshw-02.16/debian/patches/fix-645-endianness-problem-in-dev-tree-parsing.patch
--- lshw-02.16.orig/debian/patches/fix-645-endianness-problem-in-dev-tree-parsing.patch	1969-12-31 17:00:00.000000000 -0700
+++ lshw-02.16/debian/patches/fix-645-endianness-problem-in-dev-tree-parsing.patch	2014-05-01 19:48:23.597745220 -0600
@@ -0,0 +1,33 @@
+Description: Fix endianness problem in device-tree parsing
+Origin: http://ezix.org/project/changeset?old_path=%2Fpackages%2Flshw%2Fdevelopment&old=2531&new_path=%2Fpackages%2Flshw%2Fdevelopment&new=2531&sfp_email=&sfph_mail=
+Bug: http://ezix.org/project/ticket/645
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746616
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1308760
+---
+ src/core/device-tree.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
+index 6b79946..717fdbd 100644
+--- a/src/core/device-tree.cc
++++ b/src/core/device-tree.cc
+@@ -14,6 +14,7 @@
+ #include "osutils.h"
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <arpa/inet.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -48,7 +49,7 @@ static unsigned long get_long(const string & path)
+     close(fd);
+   }
+ 
+-  return result;
++  return ntohl(result);
+ }
+ 
+ 
+-- 
+2.0.0.rc0
+
diff -urpN lshw-02.16.orig/debian/patches/implement-a-better-fix-for-645-that-also-works-for-A.patch lshw-02.16/debian/patches/implement-a-better-fix-for-645-that-also-works-for-A.patch
--- lshw-02.16.orig/debian/patches/implement-a-better-fix-for-645-that-also-works-for-A.patch	1969-12-31 17:00:00.000000000 -0700
+++ lshw-02.16/debian/patches/implement-a-better-fix-for-645-that-also-works-for-A.patch	2014-05-01 19:48:22.437731791 -0600
@@ -0,0 +1,37 @@
+Description: Fix endianness problem in device-tree parsing
+Origin: http://ezix.org/project/changeset?old_path=%2Fpackages%2Flshw%2Fdevelopment&old=2532&new_path=%2Fpackages%2Flshw%2Fdevelopment&new=2532&sfp_email=&sfph_mail=
+Bug: http://ezix.org/project/ticket/645
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746616
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1308760
+---
+ src/core/device-tree.cc | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/device-tree.cc b/src/core/device-tree.cc
+index 717fdbd..827c461 100644
+--- a/src/core/device-tree.cc
++++ b/src/core/device-tree.cc
+@@ -14,7 +14,7 @@
+ #include "osutils.h"
+ #include <sys/types.h>
+ #include <sys/stat.h>
+-#include <arpa/inet.h>
++#include <endian.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+@@ -49,7 +49,10 @@ static unsigned long get_long(const string & path)
+     close(fd);
+   }
+ 
+-  return ntohl(result);
++  if(sizeof(result) == sizeof(uint64_t))
++    return be64toh(result);
++  else
++    return be32toh(result);
+ }
+ 
+ 
+-- 
+2.0.0.rc0
+
diff -urpN lshw-02.16.orig/debian/patches/series lshw-02.16/debian/patches/series
--- lshw-02.16.orig/debian/patches/series	2014-05-01 17:09:42.000000000 -0600
+++ lshw-02.16/debian/patches/series	2014-05-01 17:10:02.709537904 -0600
@@ -12,3 +12,5 @@ spelling-error.patch
 fix-manpage.patch
 arm-disable-smbios-check.patch
 lshw-devictree-assume-untyped-cpu-is-cpu.patch
+fix-645-endianness-problem-in-dev-tree-parsing.patch
+implement-a-better-fix-for-645-that-also-works-for-A.patch

Reply via email to