summaryrefslogtreecommitdiffstats
path: root/src/posix/filesystem_posix.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-12-11 00:38:17 -0500
committerDavid Robillard <d@drobilla.net>2024-12-11 00:38:17 -0500
commitc3caeb9305dea922bfe3ed71e006e567bb25ecb2 (patch)
tree9e436ea7d03ad33870b8b6c002047a92770bac72 /src/posix/filesystem_posix.c
parentc5c23c3e27ab765c8df28088fbec5f41b89bb8b8 (diff)
downloadzix-c3caeb9305dea922bfe3ed71e006e567bb25ecb2.tar.gz
zix-c3caeb9305dea922bfe3ed71e006e567bb25ecb2.tar.bz2
zix-c3caeb9305dea922bfe3ed71e006e567bb25ecb2.zip
Handle emscripten and MinGW stubs the same way
Diffstat (limited to 'src/posix/filesystem_posix.c')
-rw-r--r--src/posix/filesystem_posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/posix/filesystem_posix.c b/src/posix/filesystem_posix.c
index 2ee323a..bb398c1 100644
--- a/src/posix/filesystem_posix.c
+++ b/src/posix/filesystem_posix.c
@@ -349,7 +349,7 @@ zix_canonical_path(ZixAllocator* const allocator, const char* const path)
ZixStatus
zix_file_lock(FILE* const file, const ZixFileLockMode mode)
{
-#if !defined(__EMSCRIPTEN__) && USE_FLOCK && USE_FILENO
+#if USE_FLOCK && USE_FILENO
return zix_posix_status(
flock(fileno(file),
(mode == ZIX_FILE_LOCK_BLOCK) ? LOCK_EX : (LOCK_EX | LOCK_NB)));
@@ -364,7 +364,7 @@ zix_file_lock(FILE* const file, const ZixFileLockMode mode)
ZixStatus
zix_file_unlock(FILE* const file, const ZixFileLockMode mode)
{
-#if !defined(__EMSCRIPTEN__) && USE_FLOCK && USE_FILENO
+#if USE_FLOCK && USE_FILENO
return zix_posix_status(
flock(fileno(file),
(mode == ZIX_FILE_LOCK_BLOCK) ? LOCK_UN : (LOCK_UN | LOCK_NB)));