aboutsummaryrefslogtreecommitdiff
path: root/games/maelstrom
diff options
context:
space:
mode:
authorTobias Kortkamp <tobik@FreeBSD.org>2018-07-28 05:58:22 +0000
committerTobias Kortkamp <tobik@FreeBSD.org>2018-07-28 05:58:22 +0000
commit06019f27e96cf1f92ff34482e589e74be3e7a112 (patch)
treeda7f5972ab02f9f4144bd46e89ffdc195b57cef6 /games/maelstrom
parentde80d7358cac58235ae4318ce98eb72bc0c7c6fa (diff)
downloadports-06019f27e96cf1f92ff34482e589e74be3e7a112.tar.gz
ports-06019f27e96cf1f92ff34482e589e74be3e7a112.zip
games/maelstrom: Fix build with Clang 6
./load.h:109:22: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] sprintf(path, "%s"DIR_SEP"%s", directory, filename); ^ ./load.h:95:16: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings] directory = LIBDIR; ^ http://beefy12.nyi.freebsd.org/data/head-amd64-default/p475044_s336572/logs/maelstrom-3.0.6_13.log - While here fix some bad implicit declaration warnings
Notes
Notes: svn path=/head/; revision=475492
Diffstat (limited to 'games/maelstrom')
-rw-r--r--games/maelstrom/Makefile3
-rw-r--r--games/maelstrom/files/patch-Maelstrom-netd.c22
2 files changed, 24 insertions, 1 deletions
diff --git a/games/maelstrom/Makefile b/games/maelstrom/Makefile
index c7a52d27ebb2..875f11bbe637 100644
--- a/games/maelstrom/Makefile
+++ b/games/maelstrom/Makefile
@@ -3,7 +3,7 @@
PORTNAME= maelstrom
PORTVERSION= 3.0.6
-PORTREVISION= 13
+PORTREVISION= 14
CATEGORIES= games
MASTER_SITES= http://slouken.libsdl.org/projects/Maelstrom/src/ \
SF/nemysisfreebsdp/${CATEGORIES}/:icons
@@ -18,6 +18,7 @@ COMMENT= Asteroids-style game for X Window System
LICENSE= GPLv2
+USE_CXXSTD= gnu++98
USE_SDL= sdl net
USE_XORG= xpm
GNU_CONFIGURE= yes
diff --git a/games/maelstrom/files/patch-Maelstrom-netd.c b/games/maelstrom/files/patch-Maelstrom-netd.c
new file mode 100644
index 000000000000..be3040979d37
--- /dev/null
+++ b/games/maelstrom/files/patch-Maelstrom-netd.c
@@ -0,0 +1,22 @@
+Maelstrom-netd.c:48:10: warning: implicit declaration of function 'free' is invalid in C99 [-Wimplicit-function-declaration]
+ (void) free(players[which].packet);
+ ^
+Maelstrom-netd.c:62:3: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration]
+ exit(3);
+ ^
+Maelstrom-netd.c:62:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
+Maelstrom-netd.c:157:24: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration]
+ strcpy(ptr, (char *)inet_ntoa(player->raddr.sin_addr));
+ ^
+
+--- Maelstrom-netd.c.orig 2018-07-28 05:49:43 UTC
++++ Maelstrom-netd.c
+@@ -9,6 +9,8 @@
+ #include <sys/time.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
++#include <arpa/inet.h>
++#include <stdlib.h>
+ #include <netdb.h>
+ #include <unistd.h>
+