From 35c6b259de5f4d4b47c850f0a33a37e8faac693d Mon Sep 17 00:00:00 2001 From: meator Date: Fri, 15 Aug 2025 10:54:13 +0200 Subject: [PATCH] Fix musl compilation error related to LFS64 LFS64 interfaces are deprecated in musl, since they are not needed there. See notes for musl-1.2.4.tar.gz in https://musl.libc.org/releases.html and also https://wiki.gentoo.org/wiki/Musl_porting_notes#error:_LFS64_interfaces_.28.2A64_undeclared_here.2C_ex._pread64.29 --- CMakeLists.txt | 5 +++++ .../modules/juce_core/native/juce_SharedCode_posix.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index baefd119..9fbf6ee1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -254,6 +254,11 @@ if(APPLE) -flax-vector-conversions) endif() +# Enforce LFS64 in glibc. +if(UNIX AND NOT APPLE) + target_compile_definitions(openshot-audio PUBLIC _FILE_OFFSET_BITS=64) +endif() + # ALSA (Linux only) if(UNIX AND NOT APPLE) set(NEED_ALSA TRUE) diff --git a/JuceLibraryCode/modules/juce_core/native/juce_SharedCode_posix.h b/JuceLibraryCode/modules/juce_core/native/juce_SharedCode_posix.h index d61c4de3..87e8edc8 100644 --- a/JuceLibraryCode/modules/juce_core/native/juce_SharedCode_posix.h +++ b/JuceLibraryCode/modules/juce_core/native/juce_SharedCode_posix.h @@ -166,7 +166,7 @@ int juce_siginterrupt ([[maybe_unused]] int sig, [[maybe_unused]] int flag) //============================================================================== namespace { - #if JUCE_LINUX || (JUCE_IOS && (! TARGET_OS_MACCATALYST) && (! __DARWIN_ONLY_64_BIT_INO_T)) // (this iOS stuff is to avoid a simulator bug) + #if JUCE_IOS && (! TARGET_OS_MACCATALYST) && (! __DARWIN_ONLY_64_BIT_INO_T) // (this iOS stuff is to avoid a simulator bug) using juce_statStruct = struct stat64; #define JUCE_STAT stat64 #else