$NetBSD: patch-af,v 1.3 2001/03/16 13:58:58 wiz Exp $ --- doscmd.c.orig Thu May 2 21:37:33 1996 +++ doscmd.c @@ -100,7 +100,7 @@ char *dos_path = 0; char cmdname[256]; -char *memfile = "/tmp/doscmd.XXXXXX"; +char memfile[] = "/tmp/doscmd.XXXXXX"; int main(int argc, char **argv) @@ -133,6 +133,14 @@ 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,7 +589,11 @@ 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) {