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 @@ -22,8 +22,12 @@ if(TARGET_OS STREQUAL "Darwin") list(APPEND CPPFLAGS -DC_DARWIN) endif() +# ClamAV utilizes functions from . However, since _XOPEN_SOURCE=700 is +# defined globally on AIX, it prevents us from having access to some of the +# functions that are required within ClamAV. Thus, _XOPEN_SOURCE=600 is defined +# explicitly for AIX to resolve this issue. 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 @@ -72,8 +72,12 @@ ifeq ($(TARGET_OS),Darwin) CPPFLAGS += -DC_DARWIN endif +# ClamAV utilizes functions from . However, since _XOPEN_SOURCE=700 is +# defined globally on AIX, it prevents us from having access to some of the +# functions that are required within ClamAV. Thus, _XOPEN_SOURCE=600 is defined +# explicitly for AIX to resolve this issue. 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,12 @@ #include #include #include +// This header is required to prevent build failures coming from +// -Wimplicit-function-declaration with the strcasecmp function. +// The failures were first seen on AIX. +#ifndef C_WINDOWS +#include +#endif #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,12 @@ #include #include #include +#ifndef C_WINDOWS +// This header is required to prevent build failures coming from +// -Wimplicit-function-declaration with the strcasecmp function. +// The failures were first seen on AIX. +#include +#endif #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,15 @@ list(APPEND CXXFLAGS -Wno-implicit-function-declaration) check_function_exists(re_comp HAVE_RE_COMP) +# archie-client utilizes functions from . However, since +# _XOPEN_SOURCE=700 is defined globally on AIX, it prevents us from having +# access to some of the functions that are required within archie-client. +# Thus, _XOPEN_SOURCE=600 is defined explicitly for AIX to resolve this issue. +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,12 @@ ifeq ($(TARGET_OS),SunOS) LDFLAGS += -lsocket -lnsl endif + +# archie-client utilizes functions from . However, since +# _XOPEN_SOURCE=700 is defined globally on AIX, it prevents us from having +# access to some of the functions that are required within archie-client. +# Thus, _XOPEN_SOURCE=600 is defined explicitly for AIX to resolve this issue. +ifeq ($(TARGET_OS),AIX) +CFLAGS += -D_XOPEN_SOURCE=600 +CXXFLAGS += -D_XOPEN_SOURCE=600 +endif