diff --git a/src/cxx.cc b/src/cxx.cc index 4aac64279..70ebc0b1f 100644 --- a/src/cxx.cc +++ b/src/cxx.cc @@ -1,4 +1,5 @@ #include "../include/cxx.h" +#include #include #include #include @@ -76,8 +77,8 @@ inline namespace cxxbridge1 { template void panic [[noreturn]] (const char *msg) { #if defined(RUST_CXX_NO_EXCEPTIONS) - std::cerr << "Error: " << msg << ". Aborting." << std::endl; - std::terminate(); + std::fprintf(stderr, "Error: %s. Aborting.\n", msg); + std::abort(); #else throw Exception(msg); #endif