Patch to make 9term-1.6.6 build on modern Linux systems: - Use openpty instead of /dev/pty?? - Use - Use integers for font indexes to allow fonts with more than 65536 chars (adapted from wily). Written by Christian Neukirchen , patch against http://archive.debian.org/debian/dists/slink/main/source/x11/9term_1.6.6.orig.tar.gz http://archive.debian.org/debian/dists/slink/main/source/x11/9term_1.6.6-5.diff.gz diff -aur 9term-1.6.6.old/9term/9term.h 9term-1.6.6.orig/9term/9term.h --- 9term-1.6.6.old/9term/9term.h 2011-03-07 23:45:51.996065183 +0100 +++ 9term-1.6.6.orig/9term/9term.h 2011-03-08 00:00:54.002691256 +0100 @@ -77,7 +77,6 @@ #if defined(LINUX) #define POSIXPTYS -#define BSDPTYS #endif #if defined(RISCOS) diff -aur 9term-1.6.6.old/9term/Make.linux 9term-1.6.6.orig/9term/Make.linux --- 9term-1.6.6.old/9term/Make.linux 2011-03-07 23:45:51.999398452 +0100 +++ 9term-1.6.6.orig/9term/Make.linux 2011-03-06 18:56:52.402531220 +0100 @@ -20,7 +20,7 @@ TARGET=9term INCLUDES=-I. -I../include CFLAGS=$(OS) $(INCLUDES) -fno-builtin -D_LIBXG_EXTENSION -g -O2 -Wall -LDFLAGS=-L/usr/lib +LDFLAGS=-L/usr/lib -lutil CC=gcc # change this if your X11 libraries are in different places diff -aur 9term-1.6.6.old/9term/pty.c 9term-1.6.6.orig//9term/pty.c --- 9term-1.6.6.old/9term/pty.c 2011-03-07 23:45:51.996065183 +0100 +++ 9term-1.6.6.orig/9term/pty.c 2011-03-08 00:01:58.231539202 +0100 @@ -499,7 +499,7 @@ #endif /* defined(RISCOS) */ -#ifdef OSF1 +#if OSF1 || LINUX /* * open the master end of a pseudo-tty and return the name * of the slave end (Mips/SYSV version). diff -aur 9term-1.6.6.old/include/libg.h 9term-1.6.6.orig/include/libg.h --- 9term-1.6.6.old/include/libg.h 1996-10-17 18:15:02.000000000 +0200 +++ 9term-1.6.6.orig/include/libg.h 2011-03-07 23:31:29.415674587 +0100 @@ -94,12 +94,12 @@ struct Subfont { - short minrow; /* first character row in font (for X subfonts) */ - short mincol; /* first character col in font (for X subfonts) */ - short minchar; /* first char code in subfont */ - short maxchar; /* last char code in subfont */ - short width; /* number of chars in row */ - short n; /* number of chars in font */ + int minrow; /* first character row in font (for X subfonts) */ + int mincol; /* first character col in font (for X subfonts) */ + int minchar; /* first char code in subfont */ + int maxchar; /* last char code in subfont */ + int width; /* number of chars in row */ + int n; /* number of chars in font */ unsigned char height; /* height of bitmap */ char ascent; /* top of bitmap to baseline */ Fontchar *info; /* n+1 character descriptors */ diff -aur 9term-1.6.6.old/libframe/misc.c 9term-1.6.6.orig/libframe/misc.c --- 9term-1.6.6.old/libframe/misc.c 1996-10-17 18:15:07.000000000 +0200 +++ 9term-1.6.6.orig/libframe/misc.c 2011-03-08 00:15:50.460177610 +0100 @@ -1,6 +1,7 @@ /* Copyright (c) 1992 AT&T - All rights reserved. */ #include #include +#include #include #ifdef NEEDVARARG #include @@ -22,8 +23,6 @@ int errstr(char *buf) { - extern int errno; - strncpy(buf, strerror(errno), ERRLEN); return 1; }