Subject: pkg/14860: games/xroach does not compile
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 12/06/2001 22:52:42
>Number:         14860
>Category:       pkg
>Synopsis:       games/xroach does not compile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 06 21:45:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Robert Elz
>Release:        <NetBSD-current source date>
>Organization:
	Prince of Songkla University
>Environment:
	
System: NetBSD fuchsia 1.5Y NetBSD 1.5Y (FUCHSIA) #2: Mon Nov 26 13:41:27 ICT 2001     kre@fuchsia:/usr/obj/sys/FUCHSIA i386


>Description:
	games/xroach does not compile
>How-To-Repeat:
	cd pkgsrc/games/xroach
	make

	wait for ...

=> Checksum OK for xroach-4.4/xroach.tar.
===> Extracting for xroach-4.4
work.i386 -> /usr/obj/pkg/games/xroach/work.i386
===> Patching for xroach-4.4
===> Applying NetBSD patches for xroach-4.4
===> Configuring for xroach-4.4
===> Building for xroach-4.4
cc -O2 -I/usr/obj/pkg/games/xroach/work.i386/xroach/bitmaps -I/usr/X11R6/include  -Werror      -c xroach.c
cc1: warnings being treated as errors
xroach.c: In function `main':
xroach.c:82: warning: return type of `main' is not `int'
*** Error code 1

Stop.
make: stopped in /usr/obj/pkg/games/xroach/work.i386/xroach
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/games/xroach
*** Error code 1

Stop.
make: stopped in /usr/src/pkgsrc/games/xroach

>Fix:
	Replace patches/patch-ab with ...

--- xroach.c.orig	Sat Jun  5 02:47:09 1993
+++ xroach.c	Thu Dec  6 22:48:24 2001
@@ -77,7 +77,6 @@
 int MarkHiddenRoaches();
 Pixel AllocNamedColor();
 
-void
 main(ac, av)
 int ac;
 char *av[];
@@ -115,7 +114,7 @@
 	}
     }
 
-    srand((int)time((long *)NULL));
+    srand((int)time((time_t *)NULL));
     
     /*
        Catch some signals so we can erase any visible roaches.
@@ -212,6 +211,8 @@
     CoverRoot();
     
     XCloseDisplay(display);
+
+    exit(0);
 }
 
 #define USEPRT(msg) fprintf(stderr, msg)
>Release-Note:
>Audit-Trail:
>Unformatted: