diff options
Diffstat (limited to 'src/mac.c')
| -rw-r--r-- | src/mac.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 32 | #include <pwd.h> | 32 | #include <pwd.h> |
| 33 | #include <sys/param.h> | 33 | #include <sys/param.h> |
| 34 | #include <stdlib.h> | 34 | #include <stdlib.h> |
| 35 | #include <fcntl.h> | ||
| 35 | #if __MWERKS__ | 36 | #if __MWERKS__ |
| 36 | #include <unistd.h> | 37 | #include <unistd.h> |
| 37 | #endif | 38 | #endif |
| @@ -2811,7 +2812,8 @@ int sys_read (fds, buf, nbyte) | |||
| 2811 | int r; | 2812 | int r; |
| 2812 | 2813 | ||
| 2813 | /* Use select to block on IO while still checking for quit_char */ | 2814 | /* Use select to block on IO while still checking for quit_char */ |
| 2814 | if (!inhibit_window_system && !noninteractive) | 2815 | if (!inhibit_window_system && !noninteractive && |
| 2816 | ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK)) | ||
| 2815 | { | 2817 | { |
| 2816 | FD_ZERO (&rfds); | 2818 | FD_ZERO (&rfds); |
| 2817 | FD_SET (fds, &rfds); | 2819 | FD_SET (fds, &rfds); |