diff --git a/MultiSource/Applications/ClamAV/CMakeLists.txt b/MultiSource/Applications/ClamAV/CMakeLists.txt --- a/MultiSource/Applications/ClamAV/CMakeLists.txt +++ b/MultiSource/Applications/ClamAV/CMakeLists.txt @@ -23,7 +23,7 @@ list(APPEND CPPFLAGS -DC_DARWIN) endif() if(TARGET_OS STREQUAL "AIX") - list(APPEND CPPFLAGS -DC_AIX) + list(APPEND CPPFLAGS -DC_AIX -D_XOPEN_SOURCE=600) endif() if(TARGET_OS STREQUAL "IRIX") list(APPEND CPPFLAGS -DC_IRIX) diff --git a/MultiSource/Applications/ClamAV/Makefile b/MultiSource/Applications/ClamAV/Makefile --- a/MultiSource/Applications/ClamAV/Makefile +++ b/MultiSource/Applications/ClamAV/Makefile @@ -73,7 +73,7 @@ CPPFLAGS += -DC_DARWIN endif ifeq ($(TARGET_OS),AIX) - CPPFLAGS += -DC_AIX + CPPFLAGS += -DC_AIX -D_XOPEN_SOURCE=600 endif ifeq ($(TARGET_OS), IRIX) CPPFLAGS += -DC_IRIX diff --git a/MultiSource/Applications/ClamAV/others.h b/MultiSource/Applications/ClamAV/others.h --- a/MultiSource/Applications/ClamAV/others.h +++ b/MultiSource/Applications/ClamAV/others.h @@ -26,6 +26,7 @@ #include #include #include +#include #include "cltypes.h" #include "clamav.h" diff --git a/MultiSource/Applications/ClamAV/shared_cfgparser.c b/MultiSource/Applications/ClamAV/shared_cfgparser.c --- a/MultiSource/Applications/ClamAV/shared_cfgparser.c +++ b/MultiSource/Applications/ClamAV/shared_cfgparser.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "cfgparser.h" diff --git a/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt b/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt --- a/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt +++ b/MultiSource/Benchmarks/Prolangs-C/archie-client/CMakeLists.txt @@ -3,6 +3,11 @@ list(APPEND CXXFLAGS -Wno-implicit-function-declaration) check_function_exists(re_comp HAVE_RE_COMP) +if(TARGET_OS STREQUAL "AIX") + list(APPEND CFLAGS -D_XOPEN_SOURCE=600) + list(APPEND CXXFLAGS -D_XOPEN_SOURCE=600) +endif() + if(HAVE_RE_COMP) if(TARGET_OS STREQUAL "SunOS") list(APPEND LDFLAGS -lsocket -lnsl) diff --git a/MultiSource/Benchmarks/Prolangs-C/archie-client/Makefile b/MultiSource/Benchmarks/Prolangs-C/archie-client/Makefile --- a/MultiSource/Benchmarks/Prolangs-C/archie-client/Makefile +++ b/MultiSource/Benchmarks/Prolangs-C/archie-client/Makefile @@ -15,3 +15,8 @@ ifeq ($(TARGET_OS),SunOS) LDFLAGS += -lsocket -lnsl endif + +ifeq ($(TARGET_OS),AIX) +CFLAGS += -D_XOPEN_SOURCE=600 +CXXFLAGS += -D_XOPEN_SOURCE=600 +endif