1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/net/pmf/files/patch-tty.c
Greg Larkin 103995d974 - Parameterized pkg-plist [1]
- Use SUB_FILES to create pmfrc.default [1]
- Added another MASTER_SITE
- Recreated patches with "make makepatch" for readability
- Added handling for NOPORTEXAMPLES

PR:		ports/143146 [1]
Submitted by:	Sevan Janiyan <venture37@geeklan.co.uk> [1]
2010-02-02 19:36:09 +00:00

29 lines
786 B
C

--- ./tty.c.orig 1993-10-29 05:09:06.000000000 -0400
+++ ./tty.c 2010-02-02 14:21:04.000000000 -0500
@@ -18,6 +18,9 @@
/* Added by dodurham@stimpy.ualr.edu for Linux machines */
#ifdef SYSV
# include <termio.h>
+#elif defined(__FreeBSD__)
+# include <termios.h>
+# define termio termios
#else
# include <sgtty.h>
#endif
@@ -161,13 +164,13 @@
pmf_save_terminal()
{
- if (ioctl(0, TCGETA, &terminal_state) == -1)
+ if (tcgetattr(0, &terminal_state) == -1)
fatal("ioctl TCGETA failed in pmf_save_terminal.");
} /* pmf_save_terminal */
pmf_restore_terminal()
{
- if (ioctl(0, TCSETA, &terminal_state) == -1)
+ if (tcsetattr(0, TCSANOW, &terminal_state) == -1)
fatal("ioctl TCSETA failed in pmf_restore_terminal.");
} /* pmf_restore_terminal */