HomeFreeBSD

games/vegastrike: Fix build with Clang 6

Description

games/vegastrike: Fix build with Clang 6

In file included from src/cmd/ai/aggressive.cpp:24:
./src/vs_random.h:132:48: error: non-constant-expression cannot be narrowed from type 'int' to 'unsigned int' in initializer list [-Wc++11-narrowing]

static unsigned int mag01[2] = {0x0UL, MATRIX_A()};
                                       ^~~~~~~~~~

http://beefy11.nyi.freebsd.org/data/head-i386-default/p477696_s338122/logs/errors/vegastrike-0.5.1.r1_13.log

In file included from src/config_xml.cpp:27:
In file included from ./src/xml_support.h:6:
...
/usr/include/c++/v1/cstdlib:128:9: error: no member named 'rpl_realloc' in the global

namespace

using ::realloc;

~~^

./config.h:444:17: note: expanded from macro 'realloc'
#define realloc rpl_realloc

^

Second error is caused by failing configure checks and as a consequence
the build assumes FreeBSD does not have realloc() etc.:

In file included from conftest.cc:77:
In file included from /usr/include/c++/v1/stdlib.h:94:
/usr/include/stdlib.h:97:1: error: function declared 'noreturn' after its first declaration
_Noreturn void exit(int);
^

Details

Provenance
tobikAuthored on
Parents
rP478098: devel/ccdoc: Fix build with Clang 6
Branches
Unknown
Tags
Unknown