From 85f03c4a06a32a1697b8cbe762a9d266e0d74d4b Mon Sep 17 00:00:00 2001 From: Arkshine Date: Tue, 13 Oct 2015 20:25:09 +0200 Subject: [PATCH] Fix linux compilation with gcc-4.8 and higher. --- AMBuildScript | 3 ++- public/memtools/MemoryUtils.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AMBuildScript b/AMBuildScript index 841f86ae..5e4af0e8 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -154,7 +154,7 @@ class AMXXConfig(object): if (have_gcc and cxx.version >= '4.7') or (have_clang and cxx.version >= '3'): cfg.cxxflags += ['-Wno-delete-non-virtual-dtor'] if have_gcc and cxx.version >= '4.8': - cfg.cflags += ['-Wno-unused-result'] + cfg.cflags += ['-Wno-unused-result', '-Wno-error=sign-compare'] if have_clang: cfg.cxxflags += ['-Wno-implicit-exception-spec-mismatch'] if cxx.version >= 'apple-clang-5.1' or cxx.version >= 'clang-3.4': @@ -167,6 +167,7 @@ class AMXXConfig(object): if have_gcc: cfg.cflags += ['-Wno-parentheses'] + cfg.c_only_flags += ['-std=c99'] elif have_clang: cfg.cflags += ['-Wno-logical-op-parentheses'] diff --git a/public/memtools/MemoryUtils.cpp b/public/memtools/MemoryUtils.cpp index d99c1241..da15bce1 100644 --- a/public/memtools/MemoryUtils.cpp +++ b/public/memtools/MemoryUtils.cpp @@ -29,6 +29,7 @@ #include "MemoryUtils.h" #include // sscanf +#include // va_start, etc. #if defined(__linux__) #include