aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authortobik <tobik@FreeBSD.org>2018-07-28 13:58:22 +0800
committertobik <tobik@FreeBSD.org>2018-07-28 13:58:22 +0800
commit883edf0d755824d7f2877e06e6b75e781d5fe05a (patch)
treeda7f5972ab02f9f4144bd46e89ffdc195b57cef6 /games
parent19c0016ca094869ec1ada5babcfdce88268a06cf (diff)
downloadfreebsd-ports-gnome-883edf0d755824d7f2877e06e6b75e781d5fe05a.tar.gz
freebsd-ports-gnome-883edf0d755824d7f2877e06e6b75e781d5fe05a.tar.zst
freebsd-ports-gnome-883edf0d755824d7f2877e06e6b75e781d5fe05a.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
Diffstat (limited to 'games')
-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>
+