this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix fcntl() with FD_CLOEXEC

+3 -14
+3 -14
src/kernel/emulation/linux/fcntl/fcntl.c
··· 8 8 #ifndef O_NOFOLLOW 9 9 # define O_NOFOLLOW 0x0100 10 10 #endif 11 - #ifndef O_CLOEXEC 12 - # define O_CLOEXEC 0x1000000 11 + #ifndef FD_CLOEXEC 12 + # define FD_CLOEXEC 1 13 13 #endif 14 14 #ifndef O_DIRECTORY 15 15 # define O_DIRECTORY 0x100000 ··· 44 44 case F_SETFD: 45 45 linux_cmd = LINUX_F_SETFD; 46 46 47 - if (arg & ~O_CLOEXEC) 47 + if (arg & ~FD_CLOEXEC) 48 48 return -EINVAL; 49 - if (arg & O_CLOEXEC) 50 - arg = LINUX_O_CLOEXEC; 51 - else 52 - arg = 0; 53 49 break; 54 50 case F_GETFL: 55 51 linux_cmd = LINUX_F_GETFL; ··· 95 91 96 92 switch (cmd) 97 93 { 98 - case F_GETFD: 99 - if (ret & LINUX_O_CLOEXEC) 100 - ret = O_CLOEXEC; 101 - else 102 - ret = 0; 103 - break; 104 - 105 94 case F_GETFL: 106 95 ret = oflags_linux_to_bsd(ret); 107 96 break;