From d80a63f6617d1c56f577c947be06378a0fb54692 Mon Sep 17 00:00:00 2001 From: maz-1 Date: Fri, 10 May 2024 15:24:10 +0800 Subject: [PATCH] Fix emscripten compilation (#288) --- src/CheckedFile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CheckedFile.cpp b/src/CheckedFile.cpp index 312bd83..7898e32 100644 --- a/src/CheckedFile.cpp +++ b/src/CheckedFile.cpp @@ -43,7 +43,7 @@ #else #error "no supported compiler defined" #endif -#elif defined( __linux__ ) +#elif defined( __linux__ ) || defined( __EMSCRIPTEN__ ) #define _LARGEFILE64_SOURCE #define __LARGE64_FILES #include @@ -487,7 +487,7 @@ uint64_t CheckedFile::lseek64( int64_t offset, int whence ) #if defined( _WIN32 ) __int64 result = _lseeki64( fd_, offset, whence ); -#elif defined( __linux__ ) +#elif defined( __linux__ ) || defined( __EMSCRIPTEN__ ) int64_t result = ::lseek64( fd_, offset, whence ); #elif defined( __APPLE__ ) || defined( __BSD ) int64_t result = ::lseek( fd_, offset, whence );