gh-85277: Fix building without `stropts.h` or empty `stropts.h` (#143… · python/cpython@2756d56 · GitHub
Skip to content

Commit 2756d56

Browse files
authored
gh-85277: Fix building without stropts.h or empty stropts.h (#143521)
1 parent 2114da9 commit 2756d56

4 files changed

Lines changed: 167 additions & 146 deletions

File tree

Lines changed: 1 addition & 0 deletions

Modules/posixmodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9397,13 +9397,13 @@ os_openpty_impl(PyObject *module)
93979397
if (_Py_set_inheritable(master_fd, 0, NULL) < 0)
93989398
goto posix_error;
93999399

9400-
#if !defined(__CYGWIN__) && !defined(__ANDROID__) && !defined(HAVE_DEV_PTC)
9400+
#if defined(HAVE_STROPTS_H) && !defined(HAVE_DEV_PTC)
94019401
ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */
94029402
ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */
94039403
#ifndef __hpux
94049404
ioctl(slave_fd, I_PUSH, "ttcompat"); /* push ttcompat */
94059405
#endif /* __hpux */
9406-
#endif /* HAVE_CYGWIN */
9406+
#endif /* defined(HAVE_STROPTS_H) && !defined(HAVE_DEV_PTC) */
94079407
#endif /* HAVE_OPENPTY */
94089408

94099409
return Py_BuildValue("(ii)", master_fd, slave_fd);

configure

Lines changed: 153 additions & 143 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 11 additions & 1 deletion

0 commit comments

Comments
 (0)