diff --git a/criu/log.c b/criu/log.c index 060d1ee6e..edd2511ce 100644 --- a/criu/log.c +++ b/criu/log.c @@ -353,7 +353,7 @@ static void early_vprint(const char *format, unsigned int loglevel, va_list para void vprint_on_level(unsigned int loglevel, const char *format, va_list params) { int fd, size, ret, off = 0; - int __errno = errno; + int _errno = errno; if (unlikely(loglevel == LOG_MSG)) { fd = STDOUT_FILENO; @@ -388,7 +388,7 @@ void vprint_on_level(unsigned int loglevel, const char *format, va_list params) if (loglevel == LOG_ERROR) log_note_err(buffer + buf_off); - errno = __errno; + errno = _errno; } void print_on_level(unsigned int loglevel, const char *format, ...) diff --git a/test/zdtm/lib/msg.c b/test/zdtm/lib/msg.c index 04cd40167..fe0994077 100644 --- a/test/zdtm/lib/msg.c +++ b/test/zdtm/lib/msg.c @@ -40,7 +40,7 @@ void test_msg(const char *format, ...) va_list arg; int off = 0; char buf[TEST_MSG_BUFFER_SIZE]; - int __errno = errno; + int _errno = errno; struct timeval tv; struct tm *tm; @@ -65,5 +65,5 @@ skip: va_end(arg); write(2, buf, off); - errno = __errno; + errno = _errno; }