$NetBSD: patch-ac,v 1.1.1.1 2001/07/18 14:27:31 nra Exp $ --- xphoon.c.orig Wed Sep 18 21:57:37 1991 +++ xphoon.c @@ -31,9 +31,16 @@ /* Externals. */ +#include + +#if (defined(BSD) && (BSD >= 199306)) +#include +#include +#else extern char* malloc(); extern long time(); extern long random(); +#endif extern void getbits(); extern double jtime(); @@ -65,7 +72,7 @@ int blackflag, demoflag; int printpid; char* display_name; - long clock; + time_t clock; int pid, tty; int size; char* mooncopy; @@ -190,6 +197,7 @@ (void) fflush( stdout ); /* Go stealth (ditch our controlling tty). */ +#ifdef TIOCNOTTY tty = open( "/dev/tty", 0 ); if ( tty < 0 ) { @@ -207,6 +215,9 @@ } (void) close( tty ); } +#else + setsid(); +#endif } size = BitmapSize( moon_w, moon_h );