projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge commit 'b572c3a256e7bf1e4eecc8c36448c08093240a6a' into stable
[gnulib.git]
/
lib
/
unlockpt.c
diff --git
a/lib/unlockpt.c
b/lib/unlockpt.c
index
e03b31f
..
6785487
100644
(file)
--- a/
lib/unlockpt.c
+++ b/
lib/unlockpt.c
@@
-19,6
+19,7
@@
#include <stdlib.h>
+#include <fcntl.h>
#include <unistd.h>
int
@@
-36,6
+37,8
@@
unlockpt (int fd)
#else
/* Assume that the slave side of a pseudo-terminal is already unlocked
by default. */
+ if (fcntl (fd, F_GETFD) < 0)
+ return -1;
return 0;
#endif
}