Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jul 2018 05:58:23 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r475492 - in head/games/maelstrom: . files
Message-ID:  <201807280558.w6S5wNkE073032@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sat Jul 28 05:58:22 2018
New Revision: 475492
URL: https://svnweb.freebsd.org/changeset/ports/475492

Log:
  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

Added:
  head/games/maelstrom/files/patch-Maelstrom-netd.c   (contents, props changed)
Modified:
  head/games/maelstrom/Makefile

Modified: head/games/maelstrom/Makefile
==============================================================================
--- head/games/maelstrom/Makefile	Sat Jul 28 05:46:16 2018	(r475491)
+++ head/games/maelstrom/Makefile	Sat Jul 28 05:58:22 2018	(r475492)
@@ -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

Added: head/games/maelstrom/files/patch-Maelstrom-netd.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/maelstrom/files/patch-Maelstrom-netd.c	Sat Jul 28 05:58:22 2018	(r475492)
@@ -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>
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807280558.w6S5wNkE073032>