diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/libcurses/screen/tgetch.c | 4 | ||||
-rw-r--r-- | usr/src/lib/libcurses/screen/typeahead.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/lib/libcurses/screen/tgetch.c b/usr/src/lib/libcurses/screen/tgetch.c index 20f6995a6b..61b293cce9 100644 --- a/usr/src/lib/libcurses/screen/tgetch.c +++ b/usr/src/lib/libcurses/screen/tgetch.c @@ -41,6 +41,9 @@ #include "curses_inc.h" #include <signal.h> #include <unistd.h> +#ifndef FIONREAD +#include <fcntl.h> +#endif /* FIONREAD */ #ifdef DEBUG #include <ctype.h> #endif /* DEBUG */ @@ -533,7 +536,6 @@ _fpk(void) if (cur_term->_check_fd != -1) rc = read(cur_term->_check_fd, (char *)&c, 1); else { -#include <fcntl.h> int fcflags = fcntl(infd, F_GETFL, 0); (void) fcntl(infd, F_SETFL, fcflags | O_NDELAY); diff --git a/usr/src/lib/libcurses/screen/typeahead.c b/usr/src/lib/libcurses/screen/typeahead.c index 0d343b7539..5353b14638 100644 --- a/usr/src/lib/libcurses/screen/typeahead.c +++ b/usr/src/lib/libcurses/screen/typeahead.c @@ -37,13 +37,14 @@ * contributors. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /*LINTLIBRARY*/ #include <unistd.h> #include <sys/types.h> #include "curses_inc.h" +#ifdef SYSV +#include <fcntl.h> +#endif /* SYSV */ /* * Set the file descriptor for typeahead checks to fd. fd can be -1 @@ -62,7 +63,6 @@ typeahead(int fd) * 9.2% of the time in fcntl(). */ -#include <fcntl.h> int savefd = cur_term->_check_fd; /* Close the previous duped file descriptor. */ |