From 94397393a1801fb34d9a3c8fba65a7590f0925a5 Mon Sep 17 00:00:00 2001 From: Matej Kenda Date: Wed, 10 Jun 2026 23:38:31 +0200 Subject: [PATCH 1/4] fix: inverted exit status for ltfs --device-list show_device_list returns 0 on success and non-zero on failure, but the caller returned 0 on failure and 1 on success, so scripts checking the exit status saw the opposite result. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 533ec70d..05696035 100644 --- a/src/main.c +++ b/src/main.c @@ -704,7 +704,7 @@ int main(int argc, char **argv) if (priv->device_list) { ret = show_device_list(priv); ltfs_finish(); - return (ret != 0) ? 0 : 1; + return ret ? 1 : 0; } /* Validate sync option */ From e98808a8f4e2b964bfd321f5601404a3a856ccf7 Mon Sep 17 00:00:00 2001 From: Matej Kenda Date: Wed, 10 Jun 2026 23:48:52 +0200 Subject: [PATCH 2/4] fix: use sched_yield instead of deprecated pthread_yield pthread_yield has been deprecated since glibc 2.34 and is not provided by some C libraries (e.g. musl). sched_yield is the POSIX standard and was already used on the macOS and BSD branches; use it everywhere. --- src/libltfs/ltfs_thread.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libltfs/ltfs_thread.h b/src/libltfs/ltfs_thread.h index eb80edad..0e5b7f35 100644 --- a/src/libltfs/ltfs_thread.h +++ b/src/libltfs/ltfs_thread.h @@ -67,6 +67,7 @@ extern "C" { #endif #include +#include #include #include #include @@ -208,11 +209,10 @@ static inline ltfs_thread_t ltfs_thread_self(void) static inline int ltfs_thread_yield(void) { -#if defined (__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) + /* sched_yield() is the POSIX standard and is available on every + * supported platform; pthread_yield() is deprecated since glibc 2.34 + * and absent on some libcs (e.g. musl). */ return sched_yield(); -#else - return pthread_yield(); -#endif } #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) From af0a5b7122f0bf44fd70cd532c6f2fc5bf9f0452 Mon Sep 17 00:00:00 2001 From: Matej Kenda Date: Thu, 11 Jun 2026 10:33:59 +0200 Subject: [PATCH 3/4] fix: stray 2>/dev/null token in the SNMP agent link flags The stderr redirect for net-snmp-config --agent-libs was placed outside the backticks, so the literal string "2> /dev/null" became part of SNMP_MODULE_LIBS_A and ended up on every libtool link line. The shell then redirected the linker's stderr to /dev/null, silently discarding link errors (and making real failures undiagnosable). Only visible on systems where net-snmp is installed. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f28d2b28..12000595 100644 --- a/configure.ac +++ b/configure.ac @@ -374,7 +374,7 @@ if test "x${snmp}" != "xno" then SNMP_ENABLE="-D ENABLE_SNMP" SNMP_MODULE_CFLAGS="`net-snmp-config --cflags 2> /dev/null`"; - SNMP_MODULE_LIBS_A="`net-snmp-config --agent-libs` 2> /dev/null"; + SNMP_MODULE_LIBS_A="`net-snmp-config --agent-libs 2> /dev/null`"; SNMP_MODULE_LIBS="`net-snmp-config --libs 2> /dev/null`"; if test -z "$SNMP_MODULE_LIBS_A" then From 4e4b36fbd336d3cdb9fa9d6fb4ddccf8bcd461f5 Mon Sep 17 00:00:00 2001 From: Matej Kenda Date: Thu, 11 Jun 2026 10:57:10 +0200 Subject: [PATCH 4/4] fix: define FUSE_USE_VERSION before including fuse.h in xattr.h xattr.h included fuse.h without ltfs_fuse_version.h. libfuse 2 headers default to an old API level when FUSE_USE_VERSION is undefined, but libfuse 3 headers reject it, breaking every translation unit that pulls in xattr.h. The release branch received the same change as part of the FreeBSD build fix (b3e3355). --- src/libltfs/xattr.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libltfs/xattr.h b/src/libltfs/xattr.h index 66f82fe2..fd1785ab 100644 --- a/src/libltfs/xattr.h +++ b/src/libltfs/xattr.h @@ -66,7 +66,9 @@ extern "C" { #include "libltfs/arch/freebsd/xattr.h" #endif -#include "fuse.h" +#include "libltfs/ltfs_fuse_version.h" +#include + #include "ltfs.h" #define LTFS_PRIVATE_PREFIX "ltfs."