Build and CLI fixes#608
Open
matejk wants to merge 4 commits into
Open
Conversation
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.
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.
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.
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four small independent fixes, each its own commit:
FUSE_USE_VERSIONin xattr.h: xattr.h included fuse.h without ltfs_fuse_version.h; libfuse 2 silently falls back to an old API level and libfuse 3 headers reject it. The release branch received the same change as part of the FreeBSD build fix (b3e3355). Add libfuse 3 support with libfuse 2 fallback #603 carries a duplicate of this commit as a compile prerequisite; git drops it whichever merges first.sched_yieldinstead ofpthread_yield:pthread_yieldis deprecated and removed from glibc 2.34+, breaking the build on CentOS Stream 9, RHEL 9, and recent Fedora/Ubuntu. Addresses thepthread_yieldhalf of Build Failure: FUSE API error and deprecated pthread_yield in CentOS-Stream-9-latest-x86_64-dvd1.iso #465 (the FUSE API half is in Add libfuse 3 support with libfuse 2 fallback #603).2>/dev/nulltoken in the flags ended up on the link command line.ltfs --device-listexit status: the exit code was inverted — success returned non-zero and failure zero, breaking scripts that probe for drives.