Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2877dd

Browse files
committed
Only import termio.h on OSF, and add a comment about why it is needed there.
This header does not exist on all Unix flavors; FreeBSD in particular does not include it. This closes SF bug #422320.
1 parent b8ac009 commit b2877dd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/termios.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#define PyInit_termios inittermios
66

77
#include <termios.h>
8+
#ifdef __osf__
9+
/* On OSF, sys/ioctl.h requires that struct termio already be defined,
10+
* so this needs to be included first on that platform. */
811
#include <termio.h>
12+
#endif
913
#include <sys/ioctl.h>
1014

1115
#ifdef __BEOS__

0 commit comments

Comments
 (0)