diff --git a/src/utils/error.c b/src/utils/error.c index fee3577e1..ceb0b0cdf 100644 --- a/src/utils/error.c +++ b/src/utils/error.c @@ -30,7 +30,12 @@ void perror_fatal(const char *s) { void perror_fatal_code(const char *s, int err) { char buffer[64]; +#ifdef MINGW + fprintf(stderr, "%s: %s\n", s, strerror(err)); +#else strerror_r(err, buffer, sizeof(buffer)); fprintf(stderr, "%s: %s\n", s, buffer); +#endif + exit(YICES_EXIT_INTERNAL_ERROR); }