Fix linux compilation with gcc-4.8 and higher.

This commit is contained in:
Arkshine 2015-10-13 20:25:09 +02:00
parent 2eeeb2997d
commit 85f03c4a06
2 changed files with 3 additions and 1 deletions

View File

@ -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']

View File

@ -29,6 +29,7 @@
#include "MemoryUtils.h"
#include <stdio.h> // sscanf
#include <stdarg.h> // va_start, etc.
#if defined(__linux__)
#include <fcntl.h>