From 4a5ba91d01ea667af4a1b7bb5ee16cc665c11944 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Sun, 1 Jun 2025 10:35:21 +0300 Subject: Incorporate some fixes from #166 --- .github/workflows/tests.yml | 3 ++- configure.ac | 9 ++++++++- src/bindfs.c | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 566fe9e..5a082a6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -137,7 +137,8 @@ jobs: - name: 'Build' run: |- set -x - make -j$(nproc || sysctl -n hw.logicalcpu) VERBOSE=1 + cpu_threads="$(nproc 2>/dev/null || sysctl -n hw.logicalcpu || echo 4)" + make "-j${cpu_threads}" VERBOSE=1 - name: 'Test as non-root' run: |- diff --git a/configure.ac b/configure.ac index f20b632..0f69555 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,14 @@ AM_CONDITIONAL([INSTALL_MACOS_FS_LINK], [case $build_os in darwin* ) test x"$ena # _DARWIN_BETTER_REALPATH fixes MacOS realpath() broken around Catalina (#83). my_CPPFLAGS="-D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=700 -D__BSD_VISIBLE=1 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_DARWIN_BETTER_REALPATH" -my_CFLAGS="-std=c99 -Wall -Wextra -Wpedantic -fno-common" +dnl libfuse >=3.17 started requiring gnu11 from the C compiler +AS_IF([test "x$with_fuse2" == "xyes"], [ + my_std=c99 +], [ + my_std=gnu11 +]) + +my_CFLAGS="-std=${my_std} -Wall -Wextra -Wpedantic -fno-common" my_LDFLAGS="-pthread" AC_SUBST([my_CPPFLAGS]) AC_SUBST([my_CFLAGS]) diff --git a/src/bindfs.c b/src/bindfs.c index 08defc6..7195507 100644 --- a/src/bindfs.c +++ b/src/bindfs.c @@ -101,6 +101,7 @@ /* Apple Structs */ #ifdef __APPLE__ #include +#include #define G_PREFIX "org" #define G_KAUTH_FILESEC_XATTR G_PREFIX ".apple.system.Security" #define A_PREFIX "com" -- cgit v1.2.3