|
|
b15ea1 |
From 301bf0d2968136df30bcd6ae9f294e504ec347a8 Mon Sep 17 00:00:00 2001
|
|
|
b15ea1 |
From: Chih-Wei Huang <cwhuang@linux.org.tw>
|
|
|
b15ea1 |
Date: Wed, 22 Jan 2020 12:26:27 +0800
|
|
|
b15ea1 |
Subject: [PATCH 69/86] Android: fix building errors
|
|
|
b15ea1 |
|
|
|
b15ea1 |
Android bionic doesn't have cookie_io_functions_t, memfd_create and
|
|
|
b15ea1 |
fopencookie yet. So just disable the debug feature.
|
|
|
b15ea1 |
|
|
|
b15ea1 |
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
|
|
|
b15ea1 |
---
|
|
|
b15ea1 |
src/error.c | 8 +++++++-
|
|
|
b15ea1 |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
b15ea1 |
|
|
|
b15ea1 |
diff --git a/src/error.c b/src/error.c
|
|
|
b15ea1 |
index b1a56ef629c..f865bb61e51 100644
|
|
|
b15ea1 |
--- a/src/error.c
|
|
|
b15ea1 |
+++ b/src/error.c
|
|
|
b15ea1 |
@@ -166,10 +166,12 @@ efi_error_pop(void)
|
|
|
b15ea1 |
|
|
|
b15ea1 |
static int efi_verbose;
|
|
|
b15ea1 |
static FILE *efi_errlog, *efi_dbglog;
|
|
|
b15ea1 |
+#ifndef ANDROID
|
|
|
b15ea1 |
static int efi_dbglog_fd = -1;
|
|
|
b15ea1 |
static intptr_t efi_dbglog_cookie;
|
|
|
b15ea1 |
-static int log_level;
|
|
|
b15ea1 |
static char efi_dbglog_buf[4096];
|
|
|
b15ea1 |
+#endif
|
|
|
b15ea1 |
+static int log_level;
|
|
|
b15ea1 |
|
|
|
b15ea1 |
void PUBLIC
|
|
|
b15ea1 |
efi_set_loglevel(int level)
|
|
|
b15ea1 |
@@ -177,6 +179,7 @@ efi_set_loglevel(int level)
|
|
|
b15ea1 |
log_level = level;
|
|
|
b15ea1 |
}
|
|
|
b15ea1 |
|
|
|
b15ea1 |
+#ifndef ANDROID
|
|
|
b15ea1 |
static ssize_t
|
|
|
b15ea1 |
dbglog_write(void *cookie, const char *buf, size_t size)
|
|
|
b15ea1 |
{
|
|
|
b15ea1 |
@@ -226,6 +229,7 @@ dbglog_close(void *cookie UNUSED)
|
|
|
b15ea1 |
errno = EBADF;
|
|
|
b15ea1 |
return -1;
|
|
|
b15ea1 |
}
|
|
|
b15ea1 |
+#endif
|
|
|
b15ea1 |
|
|
|
b15ea1 |
void PUBLIC
|
|
|
b15ea1 |
efi_error_clear(void)
|
|
|
b15ea1 |
@@ -255,6 +259,7 @@ efi_error_fini(void)
|
|
|
b15ea1 |
static void CONSTRUCTOR
|
|
|
b15ea1 |
efi_error_init(void)
|
|
|
b15ea1 |
{
|
|
|
b15ea1 |
+#ifndef ANDROID
|
|
|
b15ea1 |
ssize_t bytes;
|
|
|
b15ea1 |
cookie_io_functions_t io_funcs = {
|
|
|
b15ea1 |
.write = dbglog_write,
|
|
|
b15ea1 |
@@ -274,6 +279,7 @@ efi_error_init(void)
|
|
|
b15ea1 |
if (efi_dbglog)
|
|
|
b15ea1 |
setvbuf(efi_dbglog, efi_dbglog_buf, _IOLBF,
|
|
|
b15ea1 |
sizeof(efi_dbglog_buf));
|
|
|
b15ea1 |
+#endif
|
|
|
b15ea1 |
}
|
|
|
b15ea1 |
|
|
|
b15ea1 |
FILE PUBLIC *
|
|
|
b15ea1 |
--
|
|
|
b15ea1 |
2.24.1
|
|
|
b15ea1 |
|