Skip to content

Commit 97002d8

Browse files
committed
Skip IsRegularFileOrPipe() check on Emscripten
The sandbox guarantees that this will be true. Fixes libsdl-org#12108 (backported from from commit 1c7cc60) (cherry picked from commit 0efe889)
1 parent 18ecd2c commit 97002d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/file/SDL_rwops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ static SDL_bool IsRegularFileOrPipe(FILE *f)
533533
!((st.st_mode & _S_IFMT) == _S_IFREG || (st.st_mode & _S_IFMT) == _S_IFIFO)) {
534534
return SDL_FALSE;
535535
}
536-
#else
536+
#elif !defined __EMSCRIPTEN__
537537
struct stat st;
538538
if (fstat(fileno(f), &st) < 0 || !(S_ISREG(st.st_mode) || S_ISFIFO(st.st_mode))) {
539539
return SDL_FALSE;

0 commit comments

Comments
 (0)