Fix musl compilation error related to LFS64 #167
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.
I am a Void Linux packager trying to update our openshot. This PR aims to improve musl libc support, which is currently suboptimal in the codebase.
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.
The
juce_statStructtype definition and several other things depending on it appear to be a part of libopenshot-audio's public API, so I set_FILE_OFFSET_BITS=64asPUBLIC. These changes should be fully API/ABI compatible with the previous version.I did rudimentary ABI breakage testing with abi-compliance-checker on x86_64 glibc (which worked as expected, since 64bit architectures were never affected by LFS64 if I understand it correctly) and on i686 glibc. I didn't test on musl, because it also was never affected by LFS64, since it never provided 32bit filesystem types. Everything reported 100% binary and source compatibility.
Void Linux applies additional patches to improve musl support, but I am not as familiar with them (I authored the changes in this PR, the other patches are older and I've only ported them to a newer version of libopenshot-audio). I might make a pull request for these too after I study them more.