-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
42 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c | ||
index 45fd15ee0..eadb7ceac 100644 | ||
--- a/Src/Modules/zpty.c | ||
+++ b/Src/Modules/zpty.c | ||
@@ -428,6 +428,7 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock) | ||
mypid = 0; /* trick to ensure we _exit() */ | ||
zexit(lastval, ZEXIT_NORMAL); | ||
} | ||
+#ifndef __CYGWIN__ | ||
master = movefd(master); | ||
if (master == -1) { | ||
zerrnam(nam, "cannot duplicate fd %d: %e", master, errno); | ||
@@ -435,6 +436,7 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock) | ||
ineval = oineval; | ||
return 1; | ||
} | ||
+#endif | ||
|
||
p = (Ptycmd) zalloc(sizeof(*p)); | ||
|
||
diff --git a/configure.ac b/configure.ac | ||
index bd1b40225..3b0cc1f53 100644 | ||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -2504,7 +2504,7 @@ if test x$ac_cv_have_dev_ptmx = xyes -o x$ac_cv_func_posix_openpt = xyes && \ | ||
test x$ac_cv_func_ptsname = xyes; then | ||
AC_CACHE_CHECK([if /dev/ptmx is usable], | ||
ac_cv_use_dev_ptmx, | ||
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef __linux | ||
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if defined(__linux) || defined(__CYGWIN__) | ||
#define _GNU_SOURCE 1 | ||
#endif | ||
#include <stdlib.h> |