From 1381a777e44c560b21f30a5fe00ce7832c7d519a Mon Sep 17 00:00:00 2001 From: Patrick Gutlich Date: Fri, 25 Aug 2023 18:13:07 +0200 Subject: [PATCH] fix for quirk when running 32bit os with 64bit kernel on raspberryPi --- src/hxp/System.hx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/hxp/System.hx b/src/hxp/System.hx index ccb6ffe..303a1d7 100644 --- a/src/hxp/System.hx +++ b/src/hxp/System.hx @@ -1468,7 +1468,19 @@ class System } else if (output.indexOf("arm64") > -1 || output.indexOf("aarch64") > -1) { - _hostArchitecture = ARM64; + var getconfProcess = new Process("getconf", ["LONG_BIT"]); + var getconfOutput = getconfProcess.stdout.readAll().toString(); + var getconfError = getconfProcess.stderr.readAll().toString(); + getconfProcess.exitCode(); + getconfProcess.close(); + if (StringTools.trim(getconfOutput) == "64") + { + _hostArchitecture = ARM64; + } + else + { + _hostArchitecture = ARMV7; + } } else if (output.indexOf("64") > -1) {