diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake --- a/compiler-rt/cmake/base-config-ix.cmake +++ b/compiler-rt/cmake/base-config-ix.cmake @@ -4,12 +4,13 @@ # runtime libraries. include(CheckIncludeFile) +include(CheckIncludeFiles) include(CheckCXXSourceCompiles) check_include_file(unwind.h HAVE_UNWIND_H) # Used by sanitizer_common and tests. -check_include_file(rpc/xdr.h HAVE_RPC_XDR_H) +check_include_files("rpc/types.h;rpc/xdr.h" HAVE_RPC_XDR_H) if (NOT HAVE_RPC_XDR_H) set(HAVE_RPC_XDR_H 0) endif() diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc @@ -114,6 +114,7 @@ #include #include #if HAVE_RPC_XDR_H +# include # include #endif #include