Package: xjdic
Severity: important
Tags: patch
Dear Maintainer,
xjdic currently FTBFS on hurd-i386. The attached patch should fix this issue.
WBR,
Cyril Roelandt.
-- System Information:
Debian Release: wheezy/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: hurd-i386 (i686-AT386)
Kernel: GNU-Mach 1.3.99/Hurd-0.3
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
--- xjdic-24.orig/xjdfrontend.c 2012-04-29 23:58:53.000000000 +0000
+++ xjdic-24/xjdfrontend.c 2012-04-30 00:15:09.000000000 +0000
@@ -21,6 +21,9 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
+#ifdef __GNU__
+#include <sys/ioctl.h>
+#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
@@ -41,7 +44,7 @@
#ifdef __STRICT_BSD__
#include <sgtty.h>
#else
-#ifdef __POSIX__
+#if defined(__POSIX__) || defined(__GNU__)
#include <sys/termios.h>
#else
#include <termio.h>
@@ -60,6 +63,8 @@
#ifdef __STRICT_BSD__
static struct sgttyb orig,new;
+#elif defined(__GNU__)
+static struct termios orig,new;
#else
static struct termio orig,new;
#endif
@@ -247,11 +252,11 @@
new.sg_flags |= CBREAK; new.sg_flags &= ~ECHO;
ioctl(0, TIOCSETP, &new);
#else
- ioctl(0, TCGETA, &orig); ioctl(0, TCGETA, &new);
+ tcgetattr(0, &orig); tcgetattr(0, &new);
new.c_lflag &= ~ICANON; new.c_lflag &= ~ISIG; new.c_lflag &= ~ECHO;
new.c_lflag &= ~IXON;
new.c_cc[VMIN] = 1; new.c_cc[VTIME] = 0;
- ioctl(0, TCSETA, &new);
+ tcsetattr(0, TCSANOW, &new);
#endif
myi_status=IOCTL_RAW;
}
@@ -263,7 +268,7 @@
#ifdef __STRICT_BSD__
ioctl(0, TIOCSETP, &orig);
#else
- ioctl(0, TCSETA, &orig);
+ tcsetattr(0, TCSANOW, &orig);
#endif
myi_status = IOCTL_ORIG;
}