diff options
Diffstat (limited to 'support/check.c')
-rw-r--r-- | support/check.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/support/check.c b/support/check.c index 688ed569ac..78f2b3cde1 100644 --- a/support/check.c +++ b/support/check.c @@ -18,6 +18,7 @@ #include <support/check.h> +#include <errno.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> @@ -26,9 +27,11 @@ static void print_failure (const char *file, int line, const char *format, va_list ap) { + int saved_errno = errno; printf ("error: %s:%d: ", file, line); vprintf (format, ap); puts (""); + errno = saved_errno; } int |