aboutsummaryrefslogtreecommitdiff
path: root/games/warzone2100
diff options
context:
space:
mode:
authorSimon Barner <barner@FreeBSD.org>2005-09-23 08:44:48 +0000
committerSimon Barner <barner@FreeBSD.org>2005-09-23 08:44:48 +0000
commitc360df4eb3ee8ef2460e61026e0ef30c0befa5ec (patch)
tree63463a16c32cc2aded26a51d229596891f77c2b9 /games/warzone2100
parent7d77efaa276ab8adf0259f7a19c3ce5a44f66a72 (diff)
downloadports-c360df4eb3ee8ef2460e61026e0ef30c0befa5ec.tar.gz
ports-c360df4eb3ee8ef2460e61026e0ef30c0befa5ec.zip
- Fix segmentation fault (it was calling "closedir()" with a NULL pointer
as an argument, in Linux "closedir()" ignores it, but in FreeBSD it crashes). - Fix wrapper script (arguments weren't passed to the real executable). - Bump port revision Submitted by: Alejandro Pulver <alejandro@varnet.biz> (maintainer) PR: ports/86480
Notes
Notes: svn path=/head/; revision=143395
Diffstat (limited to 'games/warzone2100')
-rw-r--r--games/warzone2100/Makefile1
-rw-r--r--games/warzone2100/files/patch-src_loadsave.c22
-rw-r--r--games/warzone2100/files/warzone.in2
3 files changed, 24 insertions, 1 deletions
diff --git a/games/warzone2100/Makefile b/games/warzone2100/Makefile
index 4103f01a9c1f..ff544144ce9a 100644
--- a/games/warzone2100/Makefile
+++ b/games/warzone2100/Makefile
@@ -7,6 +7,7 @@
PORTNAME= warzone2100
PORTVERSION= 0.2.2
+PORTREVISON= 1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/games/warzone2100/files/patch-src_loadsave.c b/games/warzone2100/files/patch-src_loadsave.c
new file mode 100644
index 000000000000..0c5689603604
--- /dev/null
+++ b/games/warzone2100/files/patch-src_loadsave.c
@@ -0,0 +1,22 @@
+--- src/loadsave.c.orig Wed Jul 27 13:33:56 2005
++++ src/loadsave.c Thu Sep 22 15:40:54 2005
+@@ -341,7 +341,8 @@
+ }
+ }
+ }
+- closedir(d);
++ if (d)
++ closedir(d);
+ }
+ #endif
+ bLoadSaveUp = TRUE;
+@@ -444,7 +445,8 @@
+ DeleteFile(entry->d_name);
+ }
+
+- closedir(d);
++ if (d)
++ closedir(d);
+ }
+ #endif
+
diff --git a/games/warzone2100/files/warzone.in b/games/warzone2100/files/warzone.in
index c8dd49cba4bb..b314ea511809 100644
--- a/games/warzone2100/files/warzone.in
+++ b/games/warzone2100/files/warzone.in
@@ -4,4 +4,4 @@
cd %%DATADIR%% || exit 1
-exec %%PREFIX%%/libexec/warzone
+exec %%PREFIX%%/libexec/warzone "$@"