aboutsummaryrefslogtreecommitdiff
path: root/emulators/x48
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2004-11-29 19:56:09 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2004-11-29 19:56:09 +0000
commitf9517b77cb19324a4b277bdad86cf56808ff8082 (patch)
tree8703aaea780e90684023a6a03f9efef8f4575323 /emulators/x48
parentdd27c5df27d0b56d92a68b896420e4a14c8b8031 (diff)
downloadports-f9517b77cb19324a4b277bdad86cf56808ff8082.tar.gz
ports-f9517b77cb19324a4b277bdad86cf56808ff8082.zip
Fix build with GCC 2.95.4.
Reported by: kris Approved by: fjoe (mentor, implicit)
Notes
Notes: svn path=/head/; revision=122760
Diffstat (limited to 'emulators/x48')
-rw-r--r--emulators/x48/files/patch-src+serial.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/emulators/x48/files/patch-src+serial.c b/emulators/x48/files/patch-src+serial.c
index 9a4ebf77dee9..75ec8a93692c 100644
--- a/emulators/x48/files/patch-src+serial.c
+++ b/emulators/x48/files/patch-src+serial.c
@@ -18,16 +18,12 @@
#include <sys/termios.h>
#endif
-@@ -135,8 +137,23 @@
-
- wire_fd = -1;
+@@ -137,6 +139,19 @@
ttyp = -1;
-+#ifdef FREEBSD
-+ int tty_m, tty_s;
-+#endif
if (useTerminal)
{
+#ifdef FREEBSD
++ int tty_m, tty_s;
+ if (openpty(&tty_m, &tty_s, tty_dev_name, NULL, NULL) == 0)
+ {
+ if (verbose)
@@ -42,7 +38,7 @@
#ifdef IRIX
if ((p = _getpty(&wire_fd, O_RDWR | O_EXCL | O_NDELAY, 0666, 0)) == NULL)
{
-@@ -234,11 +251,12 @@
+@@ -234,11 +249,12 @@
#endif /* LINUX */
#endif /* SOLARIS */
#endif /* IRIX */
@@ -56,7 +52,7 @@
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
-@@ -263,7 +281,7 @@
+@@ -263,7 +279,7 @@
if (ttyp >= 0)
{
@@ -65,7 +61,7 @@
if (tcsetattr(ttyp, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCSETS, (char *)&ttybuf) < 0)
-@@ -291,7 +309,7 @@
+@@ -291,7 +307,7 @@
if (ir_fd >= 0)
{
@@ -74,7 +70,7 @@
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
-@@ -315,7 +333,7 @@
+@@ -315,7 +331,7 @@
if (ir_fd >= 0)
{
@@ -83,7 +79,7 @@
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
-@@ -344,7 +362,7 @@
+@@ -344,7 +360,7 @@
if (ir_fd >= 0)
{
@@ -92,7 +88,7 @@
if (tcgetattr(ir_fd, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCGETS, (char *)&ttybuf) < 0)
-@@ -358,6 +376,10 @@
+@@ -358,6 +374,10 @@
}
}
@@ -103,7 +99,7 @@
ttybuf.c_cflag &= ~CBAUD;
baud &= 0x7;
-@@ -404,9 +426,11 @@
+@@ -404,9 +424,11 @@
ttybuf.c_cflag |= B9600;
}
@@ -116,7 +112,7 @@
if (tcsetattr(ir_fd, TCSANOW, &ttybuf) < 0)
#else
if (ioctl(ir_fd, TCSETS, (char *)&ttybuf) < 0)
-@@ -422,7 +446,7 @@
+@@ -422,7 +444,7 @@
if (ttyp >= 0)
{
@@ -125,7 +121,7 @@
if (tcgetattr(ttyp, &ttybuf) < 0)
#else
if (ioctl(ttyp, TCGETS, (char *)&ttybuf) < 0)
-@@ -437,6 +461,9 @@
+@@ -437,6 +459,9 @@
}
}
@@ -135,7 +131,7 @@
ttybuf.c_cflag &= ~CBAUD;
baud &= 0x7;
-@@ -482,10 +509,11 @@
+@@ -482,10 +507,11 @@
fprintf(stderr, "%s: can\'t set baud rate, using 9600\n", progname);
ttybuf.c_cflag |= B9600;
}