[CRIU] [PATCH 1/2] fix build issue under Android NDK
ning.a.zhang at intel.com
ning.a.zhang at intel.com
Mon Apr 1 06:18:30 MSK 2019
From: Zhang Ning <ning.a.zhang at intel.com>
criu/log.c:356:16: error: called object type 'int' is not a function or function pointer
int __errno = errno;
^~~~~
/root/android-ndk/toolchains/llvm/prebuilt/linux-x86_64//sysroot/usr/include/errno.h:43:24: note: expanded from macro 'errno'
~~~~~~~^
criu/log.c:391:2: error: called object type 'int' is not a function or function pointer
errno = __errno;
^~~~~
/root/android-ndk/toolchains/llvm/prebuilt/linux-x86_64//sysroot/usr/include/errno.h:43:24: note: expanded from macro 'errno'
Cc: Chen Hu <hu1.chen at intel.com>
Signed-off-by: Zhang Ning <ning.a.zhang at intel.com>
---
criu/log.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/criu/log.c b/criu/log.c
index 060d1ee6..edd2511c 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, ...)
--
2.20.1
More information about the CRIU
mailing list