1 diff -u -r -N ../tmux-1.8/compat/forkpty-linux.c ./compat/forkpty-linux.c
2 --- ../tmux-1.8/compat/forkpty-linux.c 1970-01-01 01:00:00.000000000 +0100
3 +++ ./compat/forkpty-linux.c 2014-01-08 12:44:00.885192436 +0100
6 +#include <sys/ioctl.h>
7 +#include <sys/param.h>
8 +#include <sys/types.h>
13 +int login_tty(int fd)
16 + if (ioctl(fd, TIOCSCTTY, NULL) == -1) return -1;
20 + if (fd > 2) close(fd);
24 +int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp)
29 + master = open("/dev/ptmx", O_RDWR);
30 + if (master == -1) return -1;
31 + if (grantpt(master) || unlockpt(master) || ptsname_r(master, buf, sizeof buf)) goto fail;
33 + slave = open(buf, O_RDWR | O_NOCTTY);
34 + if (slave == -1) goto fail;
36 + /* XXX Should we ignore errors here? */
37 + if (termp) tcsetattr(slave, TCSAFLUSH, termp);
38 + if (winp) ioctl(slave, TIOCSWINSZ, winp);
42 + if (name != NULL) strcpy(name, buf);
51 +int forkpty(int *amaster, char *name, struct termios *termp, struct winsize *winp)
53 + int master, slave, pid;
54 + if (openpty(&master, &slave, name, termp, winp) == -1) return -1;
55 + switch (pid = fork()) {
60 + if (login_tty (slave)) _exit (1);
68 diff -u -r -N ../tmux-1.8/compat/imsg-buffer.c ./compat/imsg-buffer.c
69 --- ../tmux-1.8/compat/imsg-buffer.c 2013-02-10 17:20:15.000000000 +0100
70 +++ ./compat/imsg-buffer.c 2014-01-08 12:33:53.721206934 +0100
76 +# define IOV_MAX 1024
79 int ibuf_realloc(struct ibuf *, size_t);
80 void ibuf_enqueue(struct msgbuf *, struct ibuf *);
81 void ibuf_dequeue(struct msgbuf *, struct ibuf *);