From b2f6454a2b2517cfba7a24cf02e9bdf3b959c86a Mon Sep 17 00:00:00 2001 From: Tony Butler Date: Sat, 18 Feb 2023 13:20:48 -0800 Subject: [PATCH] Move sysinfo.h into the linux-only section, should fix build on MacOS. All compilers set `__linux__`, but `linux` may not be defined, and usage was mixed. Use `__linux__` everywhere instead. Signed-off-by: Tony Butler --- squashfs-tools/mksquashfs.c | 6 +++--- squashfs-tools/unsquashfs.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) --- a/squashfs-tools/mksquashfs.c +++ b/squashfs-tools/mksquashfs.c @@ -50,9 +50,9 @@ #include #include #include -#include -#ifdef linux +#ifdef __linux__ +#include #include #else #include @@ -5081,7 +5081,7 @@ static void initialise_threads(int readq BAD_ERROR("Failed to set signal mask in intialise_threads\n"); if(processors == -1) { -#ifdef linux +#ifdef __linux__ cpu_set_t cpu_set; CPU_ZERO(&cpu_set); --- a/squashfs-tools/unsquashfs.c +++ b/squashfs-tools/unsquashfs.c @@ -2720,7 +2720,7 @@ void initialise_threads(int fragment_buf } if(processors == -1) { -#ifdef linux +#ifdef __linux__ cpu_set_t cpu_set; CPU_ZERO(&cpu_set);