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