From 9ba6a0085c72902f8ac30e4378db54fe7f2ff7d6 Mon Sep 17 00:00:00 2001 From: Pavel Fedin
acl: fix definition of acl_from_mode on FreeBSD 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' diff --git a/tests/test-openpty.c b/tests/test-openpty.c index 9fc4ed2757..ee36fe6e38 100644 --- a/tests/test-openpty.c +++ b/tests/test-openpty.c @@ -34,6 +34,7 @@ int main () { { +#ifndef _WIN32 int master; int slave; @@ -103,6 +104,7 @@ main () /* Close the master side before the slave side gets closed. This is necessary on Mac OS X 10.4.11. */ close (master); +#endif } return 0; -- 2.39.5