Bug 184244 - games/jfk: Fix build with clang
Summary: games/jfk: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: William Grzybowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-24 18:10 UTC by tkato432
Modified: 2013-11-30 11:10 UTC (History)
0 users

See Also:


Attachments
file.diff (1.97 KB, patch)
2013-11-24 18:10 UTC, tkato432
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tkato432 2013-11-24 18:10:08 UTC
- Fix build with clang

New file:
files/patch-src__client__objects_c.cc
files/patch-src__lib__network.cc
Comment 1 William Grzybowski freebsd_committer 2013-11-30 11:08:31 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wg

I'll take it.
Comment 2 William Grzybowski freebsd_committer 2013-11-30 11:08:42 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer 2013-11-30 11:08:44 UTC
Author: wg
Date: Sat Nov 30 11:08:26 2013
New Revision: 335283
URL: http://svnweb.freebsd.org/changeset/ports/335283

Log:
  games/jfk: fix build with clang
  
  PR:		ports/184244
  Submitted by:	KATO Tsuguru <tkato432 yahoo.com>

Added:
  head/games/jfk/files/patch-src__client__objects_c.cc   (contents, props changed)
  head/games/jfk/files/patch-src__lib__network.cc   (contents, props changed)
Modified:
  head/games/jfk/Makefile

Modified: head/games/jfk/Makefile
==============================================================================
--- head/games/jfk/Makefile	Sat Nov 30 11:04:51 2013	(r335282)
+++ head/games/jfk/Makefile	Sat Nov 30 11:08:26 2013	(r335283)
@@ -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

Added: head/games/jfk/files/patch-src__client__objects_c.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/jfk/files/patch-src__client__objects_c.cc	Sat Nov 30 11:08:26 2013	(r335283)
@@ -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"

Added: head/games/jfk/files/patch-src__lib__network.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/jfk/files/patch-src__lib__network.cc	Sat Nov 30 11:08:26 2013	(r335283)
@@ -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();
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"