Blame SOURCES/0006-fix-714-system-width-detection.patch

99c779
From cb3c2999b586aaef7e5bd5ba60f1e3631ec756c1 Mon Sep 17 00:00:00 2001
99c779
From: Lyonel Vincent <lyonel@ezix.org>
99c779
Date: Fri, 6 May 2016 16:38:38 +0200
99c779
Subject: [PATCH 06/43] fix #714 (system width detection)
99c779
99c779
---
99c779
 src/core/abi.cc | 4 +++-
99c779
 1 file changed, 3 insertions(+), 1 deletion(-)
99c779
99c779
diff --git a/src/core/abi.cc b/src/core/abi.cc
99c779
index 76e5082..adff7b5 100644
99c779
--- a/src/core/abi.cc
99c779
+++ b/src/core/abi.cc
99c779
@@ -20,7 +20,9 @@ __ID("@(#) $Id: mem.cc 1352 2006-05-27 23:54:13Z ezix $");
99c779
 bool scan_abi(hwNode & system)
99c779
 {
99c779
   // are we compiled as 32- or 64-bit process ?
99c779
-  system.setWidth(sysconf(LONG_BIT));
99c779
+  long sc = sysconf(LONG_BIT);
99c779
+  if(sc==-1) sc = sysconf(_SC_LONG_BIT);
99c779
+  if(sc!=-1) system.setWidth(sc);
99c779
 
99c779
   pushd(PROC_SYS);
99c779
 
99c779
-- 
99c779
2.10.2
99c779