[lxc-devel] [lxc/master] log: account for Android's Bionic's strerror_r()

brauner on Github lxc-bot at linuxcontainers.org
Tue Jun 26 09:27:03 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180626/abb23d9b/attachment.bin>
-------------- next part --------------
From 3f93295e53b87d399a083bf5c2b7d66bf33375c7 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Tue, 26 Jun 2018 11:25:37 +0200
Subject: [PATCH] log: account for Android's Bionic's strerror_r()

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/log.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/log.h b/src/lxc/log.h
index e183a3a79..7320537c1 100644
--- a/src/lxc/log.h
+++ b/src/lxc/log.h
@@ -295,7 +295,7 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,	\
 /*
  * Helper macro to define errno string.
  */
-#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)
+#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && (!defined(_GNU_SOURCE) || IS_BIONIC)
 #define lxc_log_strerror_r                                               \
 	char errno_buf[MAXPATHLEN / 2] = {"Failed to get errno string"}; \
 	char *ptr = errno_buf;                                           \


More information about the lxc-devel mailing list