summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/grantpt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/grantpt.c b/lib/grantpt.c
index a740091bad..1a48645c56 100644
--- a/lib/grantpt.c
+++ b/lib/grantpt.c
@@ -46,9 +46,10 @@
int
grantpt (int fd)
{
-#if defined __OpenBSD__
+#if defined __OpenBSD__ || defined _WIN32
/* On OpenBSD, master and slave of a pseudo-terminal are allocated together,
- through an ioctl on /dev/ptm. There is no need for grantpt(). */
+ through an ioctl on /dev/ptm. On Windows there are no ptys.
+ Therefore in either case there is no need for grantpt(). */
return 0;
#else
/* This function is most often called from a process without 'root'