diff --git a/flang-rt/include/flang-rt/runtime/io-stmt.h b/flang-rt/include/flang-rt/runtime/io-stmt.h index b6e95d155d01..73c59b0b5ed2 100644 --- a/flang-rt/include/flang-rt/runtime/io-stmt.h +++ b/flang-rt/include/flang-rt/runtime/io-stmt.h @@ -20,6 +20,7 @@ #include "flang/Common/optional.h" #include "flang/Common/reference-wrapper.h" #include "flang/Common/visit.h" +#include "flang/Runtime/freestanding-tools.h" #include "flang/Runtime/io-api.h" #include #include @@ -180,8 +181,8 @@ public: private: RT_API_ATTRS void CheckForAsterisk() { - hasAsterisk_ = - at_ && at_ < limit_ && std::memchr(at_, '*', limit_ - at_) != nullptr; + hasAsterisk_ = at_ && at_ < limit_ && + runtime::memchr(at_, '*', limit_ - at_) != nullptr; } ConnectionState &connection_;