FTBFS when using musl libc
This was attempted from a Alpine Linux Docker image
Snipped for brevity:
[1/3] Compiling C++ object src/libmedialibrary.a.p/LockFile.cpp.o
ninja: job failed: g++ -Isrc/libmedialibrary.a.p -Isrc -I../src -I. -I.. -Iinclude -I../include -I/home/videolan/vlc/contrib/x86_64-alpine-linux-musl/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++14 -O2 -g -DHAVE_CONFIG_H=1 -fPIC -pthread -MD -MQ src/libmedialibrary.a.p/LockFile.cpp.o -MF src/libmedialibrary.a.p/LockFile.cpp.o.d -o src/libmedialibrary.a.p/LockFile.cpp.o -c ../src/LockFile.cpp
../src/LockFile.cpp: In static member function 'static std::unique_ptr<medialibrary::LockFile> medialibrary::LockFile::lock(const string&)':
../src/LockFile.cpp:57:16: error: '::open' has not been declared; did you mean 'popen'?
57 | handle = ::open( lockFile.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR );
| ^~~~
| popen
../src/LockFile.cpp:57:40: error: 'O_RDWR' was not declared in this scope
57 | handle = ::open( lockFile.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR );
| ^~~~~~
../src/LockFile.cpp:57:49: error: 'O_CREAT' was not declared in this scope
57 | handle = ::open( lockFile.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR );
| ^~~~~~~
../src/LockFile.cpp:57:58: error: 'S_IRUSR' was not declared in this scope
57 | handle = ::open( lockFile.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR );
| ^~~~~~~
../src/LockFile.cpp:57:68: error: 'S_IWUSR' was not declared in this scope
57 | handle = ::open( lockFile.c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR );
| ^~~~~~~
ninja: subcommand failed