summaryrefslogtreecommitdiff
path: root/flang-rt/lib/runtime/stat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'flang-rt/lib/runtime/stat.cpp')
-rw-r--r--flang-rt/lib/runtime/stat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/flang-rt/lib/runtime/stat.cpp b/flang-rt/lib/runtime/stat.cpp
index 322b7282b702..1d4aae2e4973 100644
--- a/flang-rt/lib/runtime/stat.cpp
+++ b/flang-rt/lib/runtime/stat.cpp
@@ -84,10 +84,10 @@ RT_API_ATTRS int ToErrmsg(const Descriptor *errmsg, int stat) {
std::size_t bufferLength{errmsg->ElementBytes()};
std::size_t msgLength{Fortran::runtime::strlen(msg)};
if (msgLength >= bufferLength) {
- std::memcpy(buffer, msg, bufferLength);
+ runtime::memcpy(buffer, msg, bufferLength);
} else {
- std::memcpy(buffer, msg, msgLength);
- std::memset(buffer + msgLength, ' ', bufferLength - msgLength);
+ runtime::memcpy(buffer, msg, msgLength);
+ runtime::memset(buffer + msgLength, ' ', bufferLength - msgLength);
}
}
}