aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2025-06-01 10:35:21 +0300
committerMartin Pärtel <martin.partel@gmail.com>2025-06-01 10:40:23 +0300
commit4a5ba91d01ea667af4a1b7bb5ee16cc665c11944 (patch)
treec0e447e43b481e9b960bf67fee69bf7992c5fc2b
parentb9eee2a87d79e62ee5aaafe03c191337c93ff115 (diff)
downloadbindfs-4a5ba91d01ea667af4a1b7bb5ee16cc665c11944.tar.gz
Incorporate some fixes from #166
-rw-r--r--.github/workflows/tests.yml3
-rw-r--r--configure.ac9
-rw-r--r--src/bindfs.c1
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 <sys/param.h>
+#include <sys/dirent.h>
#define G_PREFIX "org"
#define G_KAUTH_FILESEC_XATTR G_PREFIX ".apple.system.Security"
#define A_PREFIX "com"