diff options
author | William Grzybowski <wg@FreeBSD.org> | 2013-11-30 11:08:26 +0000 |
---|---|---|
committer | William Grzybowski <wg@FreeBSD.org> | 2013-11-30 11:08:26 +0000 |
commit | c4cbfa3b76224b002d7e06570e70d48ad2001b49 (patch) | |
tree | a98308c7c67d6e2281316e552bb2bee238776e26 /games/jfk | |
parent | ac6da6d61bbd378b3137858937785e6905933a9e (diff) | |
download | ports-c4cbfa3b76224b002d7e06570e70d48ad2001b49.tar.gz ports-c4cbfa3b76224b002d7e06570e70d48ad2001b49.zip |
games/jfk: fix build with clang
PR: ports/184244
Submitted by: KATO Tsuguru <tkato432 yahoo.com>
Notes
Notes:
svn path=/head/; revision=335283
Diffstat (limited to 'games/jfk')
-rw-r--r-- | games/jfk/Makefile | 1 | ||||
-rw-r--r-- | games/jfk/files/patch-src__client__objects_c.cc | 10 | ||||
-rw-r--r-- | games/jfk/files/patch-src__lib__network.cc | 27 |
3 files changed, 37 insertions, 1 deletions
diff --git a/games/jfk/Makefile b/games/jfk/Makefile index 3044fce413c9..6ac3dc9a213c 100644 --- a/games/jfk/Makefile +++ b/games/jfk/Makefile @@ -8,7 +8,6 @@ CATEGORIES= games MASTER_SITES= http://hop.at/jfk/ LICENSE= GPLv2 # (or later) -LICENSE_FILE= ${WRKSRC}/COPYING MAINTAINER= ports@FreeBSD.org COMMENT= Multiplayer 2D shoot'em up game diff --git a/games/jfk/files/patch-src__client__objects_c.cc b/games/jfk/files/patch-src__client__objects_c.cc new file mode 100644 index 000000000000..dbdf44de754a --- /dev/null +++ b/games/jfk/files/patch-src__client__objects_c.cc @@ -0,0 +1,10 @@ +--- src/client/objects_c.cc.orig ++++ src/client/objects_c.cc +@@ -21,6 +21,7 @@ + */ + + #include <cmath> ++#include <cstdlib> + #include <string> + #include "objects_c.h" + #include "level.h" diff --git a/games/jfk/files/patch-src__lib__network.cc b/games/jfk/files/patch-src__lib__network.cc new file mode 100644 index 000000000000..38e47e50225f --- /dev/null +++ b/games/jfk/files/patch-src__lib__network.cc @@ -0,0 +1,27 @@ +--- src/lib/network.cc.orig ++++ src/lib/network.cc +@@ -6,6 +6,7 @@ + #include <cassert> + #include <cerrno> + #include <csignal> ++#include <cstdlib> + #include <cstring> + #include <new> + #include <string> +@@ -289,7 +290,7 @@ + + set_socket_nonblocking(listenfd); + +- sa = (sockaddr*)std::malloc(MAXSOCKADDR); ++ sa = (sockaddr*)malloc(MAXSOCKADDR); + if (sa == NULL) + throw std::bad_alloc(); + } +@@ -370,7 +371,7 @@ + const size_t MIN_POLLFD = 10; + /* allocate more memory for the pollfd array */ + fd_alloc = std::max(MIN_POLLFD, 3 * fd_alloc / 2); +- pollfd* tmp = (pollfd*)std::realloc(fds, fd_alloc * sizeof *fds); ++ pollfd* tmp = (pollfd*)realloc(fds, fd_alloc * sizeof *fds); + if (tmp == NULL) + throw std::bad_alloc(); |