mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
30f2d516ba
squashfs tool is finally reborn and correctly maintained. Introduce the new version as a replacement for squasfs4kit as it was a fork and also abandoned. Add additional patch to add the missing feature present in squashfskit4 but still missing on this new project. Backport each required patch that fix compilation error on macos. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
31 lines
881 B
Diff
31 lines
881 B
Diff
From 374e39a786a5acda841056bec26fd0e0c4d40dac Mon Sep 17 00:00:00 2001
|
|
From: Phillip Lougher <phillip@squashfs.org.uk>
|
|
Date: Mon, 15 Aug 2022 17:09:05 +0100
|
|
Subject: [PATCH 1/1] Mksquashfs: Make sysinfo() conditional
|
|
|
|
Fixes https://github.com/plougher/squashfs-tools/issues/123
|
|
|
|
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
|
|
---
|
|
squashfs-tools/mksquashfs.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
--- a/squashfs-tools/mksquashfs.c
|
|
+++ b/squashfs-tools/mksquashfs.c
|
|
@@ -5802,6 +5802,7 @@ static int get_physical_memory()
|
|
long long page_size = sysconf(_SC_PAGESIZE);
|
|
int phys_mem;
|
|
|
|
+#ifdef __linux__
|
|
if(num_pages == -1 || page_size == -1) {
|
|
struct sysinfo sys;
|
|
int res = sysinfo(&sys);
|
|
@@ -5812,6 +5813,7 @@ static int get_physical_memory()
|
|
num_pages = sys.totalram;
|
|
page_size = sys.mem_unit;
|
|
}
|
|
+#endif
|
|
|
|
phys_mem = num_pages * page_size >> 20;
|
|
|