From b6ba7fff6793ab55f328e287348db3b9840dd508 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 1 Apr 2012 14:41:17 +0000 Subject: Cast away some constness so this builds with clang. --- .../patches/patch-lib_warmux_action_action.cpp | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 games/warmux/patches/patch-lib_warmux_action_action.cpp (limited to 'games/warmux/patches') diff --git a/games/warmux/patches/patch-lib_warmux_action_action.cpp b/games/warmux/patches/patch-lib_warmux_action_action.cpp new file mode 100644 index 00000000000..c190719182d --- /dev/null +++ b/games/warmux/patches/patch-lib_warmux_action_action.cpp @@ -0,0 +1,27 @@ +$NetBSD: patch-lib_warmux_action_action.cpp,v 1.1 2012/04/01 14:41:17 wiz Exp $ + +Cast away some constness for clang-3.1. + +--- lib/warmux/action/action.cpp.orig 2011-01-20 15:53:53.000000000 +0000 ++++ lib/warmux/action/action.cpp +@@ -73,16 +73,16 @@ Action::Action(const char *buffer, Dista + + var.clear(); + buffer += 4; // skip the buffer len +- m_type = (Action_t)SDLNet_Read32(buffer); ++ m_type = (Action_t)SDLNet_Read32((char*)buffer); + buffer += 4; +- m_timestamp = (uint)SDLNet_Read32(buffer); ++ m_timestamp = (uint)SDLNet_Read32((char*)buffer); + buffer += 4; +- int m_length = SDLNet_Read32(buffer); ++ int m_length = SDLNet_Read32((char*)buffer); + buffer += 4; + + for(int i=0; i < m_length; i++) + { +- uint32_t val = SDLNet_Read32(buffer); ++ uint32_t val = SDLNet_Read32((char*)buffer); + var.push_back(val); + buffer += 4; + } -- cgit v1.2.3