summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibC/fcntl.h1
-rw-r--r--Libraries/LibC/unistd.cpp3
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibC/fcntl.h b/Libraries/LibC/fcntl.h
index d56dae85f5..1aa6e6cd09 100644
--- a/Libraries/LibC/fcntl.h
+++ b/Libraries/LibC/fcntl.h
@@ -36,6 +36,7 @@ __BEGIN_DECLS
#define F_SETFD 2
#define F_GETFL 3
#define F_SETFL 4
+#define F_ISTTY 5
#define FD_CLOEXEC 1
diff --git a/Libraries/LibC/unistd.cpp b/Libraries/LibC/unistd.cpp
index 652eaabe43..ec01ad1be4 100644
--- a/Libraries/LibC/unistd.cpp
+++ b/Libraries/LibC/unistd.cpp
@@ -413,8 +413,7 @@ int rmdir(const char* pathname)
int isatty(int fd)
{
- struct termios dummy;
- return tcgetattr(fd, &dummy) == 0;
+ return fcntl(fd, F_ISTTY);
}
int dup(int old_fd)