$NetBSD: patch-af,v 1.2 1999/12/18 01:46:29 christos Exp $ *** doscmd.c.orig Thu May 2 15:37:33 1996 --- doscmd.c Fri Dec 17 20:25:25 1999 *************** *** 100,106 **** char *dos_path = 0; char cmdname[256]; ! char *memfile = "/tmp/doscmd.XXXXXX"; int main(int argc, char **argv) --- 100,106 ---- char *dos_path = 0; char cmdname[256]; ! char memfile[] = "/tmp/doscmd.XXXXXX"; int main(int argc, char **argv) *************** *** 133,138 **** --- 133,146 ---- if (fd != 3 && fd != 4) close (fd); + #ifdef __ELF__ + if (mmap((void *)4096, 1024 * 1024, PROT_READ|PROT_WRITE, + MAP_ANON|MAP_FIXED|MAP_PRIVATE, -1, (off_t)0) == MAP_FAILED) { + perror("mmap botch"); + quit(1); + } + #endif + fd = -1; debug_set(0); /* debug any D_TRAPS without intnum */ *************** *** 581,587 **** --- 589,599 ---- SET16(sc.sc_fs, 0x0000); SET16(sc.sc_gs, 0x0000); + #if defined(__LIBC12_SOURCE__) sc.sc_mask = 0; + #else + sigemptyset(&sc.sc_mask); + #endif sc.sc_onstack = 0; if (tflag) {