diff -ru screen-4.0.2-orig/display.c screen-4.0.2/display.c --- screen-4.0.2-orig/display.c 2003-12-05 05:45:41.000000000 -0800 +++ screen-4.0.2/display.c 2006-11-27 10:04:10.000000000 -0800 @@ -3908,7 +3908,7 @@ signal(SIGPIPE, SIG_DFL); #endif display = 0; - execvpe(*cmdv, cmdv, NewEnv + 3); + xexecvpe(*cmdv, cmdv, NewEnv + 3); Panic(errno, *cmdv); default: break; diff -ru screen-4.0.2-orig/extern.h screen-4.0.2/extern.h --- screen-4.0.2-orig/extern.h 2003-08-22 05:27:57.000000000 -0700 +++ screen-4.0.2/extern.h 2006-11-27 10:04:06.000000000 -0800 @@ -146,7 +146,7 @@ #ifdef ZMODEM extern void zmodem_abort __P((struct win *, struct display *)); #endif -extern void execvpe __P((char *, char **, char **)); +extern void xexecvpe __P((char *, char **, char **)); /* utmp.c */ #ifdef UTMPOK diff -ru screen-4.0.2-orig/misc.c screen-4.0.2/misc.c --- screen-4.0.2-orig/misc.c 2003-12-05 05:45:41.000000000 -0800 +++ screen-4.0.2/misc.c 2006-11-27 10:04:42.000000000 -0800 @@ -613,7 +613,7 @@ */ # endif /* NEEDSETENV */ #else /* USESETENV */ -# if defined(linux) || defined(__convex__) || (BSD >= 199103) +# if defined(linux) || defined(__convex__) || (BSD >= 199103) || defined(__QNXNTO__) setenv(var, value, 1); # else setenv(var, value); diff -ru screen-4.0.2-orig/utmp.c screen-4.0.2/utmp.c --- screen-4.0.2-orig/utmp.c 2003-09-08 07:27:17.000000000 -0700 +++ screen-4.0.2/utmp.c 2006-11-27 10:06:11.000000000 -0800 @@ -89,7 +89,7 @@ static int initutmp __P((void)); static void setutent __P((void)); #endif -#if defined(linux) && defined(GETUTENT) +#if (defined(linux) || defined(__QNXNTO__)) && defined(GETUTENT) static struct utmp *xpututline __P((struct utmp *utmp)); # define pututline xpututline #endif @@ -858,10 +858,10 @@ } # endif /* BUGGYGETLOGIN */ -#if defined(linux) && defined(GETUTENT) +#if (defined(linux) || defined(__QNXNTO__)) && defined(GETUTENT) # undef pututline -/* aargh, linux' pututline returns void! */ +/* aargh, linux' and QNX' pututline returns void! */ struct utmp * xpututline(u) struct utmp *u; diff -ru screen-4.0.2-orig/window.c screen-4.0.2/window.c --- screen-4.0.2-orig/window.c 2003-12-05 05:45:41.000000000 -0800 +++ screen-4.0.2/window.c 2006-11-27 10:04:00.000000000 -0800 @@ -1375,8 +1375,8 @@ proc++; if (!*proc) proc = DefaultShell; - debug1("calling execvpe %s\n", proc); - execvpe(proc, args, NewEnv); + debug1("calling xexecvpe %s\n", proc); + xexecvpe(proc, args, NewEnv); debug1("exec error: %d\n", errno); Panic(errno, "Cannot exec '%s'", proc); default: @@ -1388,7 +1388,7 @@ } void -execvpe(prog, args, env) +xexecvpe(prog, args, env) char *prog, **args, **env; { register char *path = NULL, *p;