Skip to content

Commit 3250ce4

Browse files
committed
Fix
1 parent 0b06534 commit 3250ce4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/emscripten_syscalls.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ int __syscall_ioctl(int fd, int request, void* varargs) {
302302
int flags = fcntl(fd, F_GETFL, 0);
303303
int nonblock = **((int**)varargs);
304304
if (flags < 0) {
305-
return errno;
305+
return -errno;
306306
}
307307
if (nonblock) {
308308
flags |= O_NONBLOCK;
@@ -311,7 +311,7 @@ int __syscall_ioctl(int fd, int request, void* varargs) {
311311
}
312312
int res = fcntl(fd, F_SETFL, flags);
313313
if (res < 0) {
314-
return errno;
314+
return -errno;
315315
}
316316
return res;
317317
}

0 commit comments

Comments
 (0)