summaryrefslogtreecommitdiff
path: root/repo/lshw/fix-musl-sc_long_bit.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-09 14:35:52 +0100
committerdavidovski <david@davidovski.xyz>2022-06-09 14:35:52 +0100
commitd1fc3393cca72e8e432f827f7624e38734fad6dc (patch)
tree7b971fbfc203ff017ad78852476bfcccee170971 /repo/lshw/fix-musl-sc_long_bit.patch
parentccc722b7ed330198d82a3cf28ead76d6d107a70a (diff)
moved firmware to separate pacakges
Diffstat (limited to 'repo/lshw/fix-musl-sc_long_bit.patch')
-rw-r--r--repo/lshw/fix-musl-sc_long_bit.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/repo/lshw/fix-musl-sc_long_bit.patch b/repo/lshw/fix-musl-sc_long_bit.patch
new file mode 100644
index 0000000..b409dfe
--- /dev/null
+++ b/repo/lshw/fix-musl-sc_long_bit.patch
@@ -0,0 +1,14 @@
+--- a/src/core/abi.cc
++++ b/src/core/abi.cc
+@@ -21,7 +21,11 @@
+ {
+ // are we compiled as 32- or 64-bit process ?
+ long sc = sysconf(LONG_BIT);
++#ifdef _SC_LONG_BIT
+ if(sc==-1) sc = sysconf(_SC_LONG_BIT);
++#else
++ if(sc==-1) sc = (CHAR_BIT * sizeof(long));
++#endif
+ if(sc!=-1) system.setWidth(sc);
+
+ pushd(PROC_SYS);