From 507d816b87d4911c720d45c456ae19b60aedabef Mon Sep 17 00:00:00 2001 From: sthen Date: Sat, 30 May 2026 13:42:03 +0000 Subject: [PATCH] pass NULL instead of (int*) 0 as FDs to select --- x11/xantfarm/Makefile | 2 +- x11/xantfarm/patches/patch-xantfarm_c | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/x11/xantfarm/Makefile b/x11/xantfarm/Makefile index ae05861e771..170726caa80 100644 --- a/x11/xantfarm/Makefile +++ b/x11/xantfarm/Makefile @@ -2,7 +2,7 @@ COMMENT= ant hill simulation on X11 root window DISTNAME= xantfarm PKGNAME= xantfarm-1.16 -REVISION= 3 +REVISION= 4 CATEGORIES= x11 HOMEPAGE= http://www.acme.com/software/xantfarm/ diff --git a/x11/xantfarm/patches/patch-xantfarm_c b/x11/xantfarm/patches/patch-xantfarm_c index 2e6e310969d..40c9adec845 100644 --- a/x11/xantfarm/patches/patch-xantfarm_c +++ b/x11/xantfarm/patches/patch-xantfarm_c @@ -43,7 +43,26 @@ Index: xantfarm.c main( argc, argv ) int argc; char* argv[]; -@@ -1539,7 +1528,7 @@ read_world( cf ) +@@ -403,9 +392,6 @@ usage: + exit( 1 ); + } + +- /* Initialize the random number generator. */ +- srandom( (int) ( time( (long*) 0 ) ^ getpid() ) ); +- + /* Create the ant world. */ + ant_init(); + +@@ -870,7 +856,7 @@ main_loop() + FD_SET( fd, &fds ); + timeout.tv_sec = 1 / cycles; + timeout.tv_usec = 1000000L / cycles; +- (void) select( fd + 1, &fds, (int*) 0, (int*) 0, &timeout ); ++ (void) select( fd + 1, &fds, NULL, NULL, &timeout ); + } + if ( XPending( display ) == 0 ) + { +@@ -1539,7 +1525,7 @@ read_world( cf ) char* cf; { FILE* cfP;