Merge "system/extras/verity: BoringSSL fix."
diff --git a/verity/verify_boot_signature.c b/verity/verify_boot_signature.c
index 2274291..55591aa 100644
--- a/verity/verify_boot_signature.c
+++ b/verity/verify_boot_signature.c
@@ -24,6 +24,7 @@
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
+#include <errno.h>
#include <openssl/asn1.h>
#include <openssl/asn1t.h>
@@ -69,6 +70,14 @@
static BIO *g_error = NULL;
+#if defined(OPENSSL_IS_BORINGSSL)
+/* In BoringSSL, ERR_print_errors has been moved to the BIO functions in order
+ * to avoid the incorrect dependency of ERR on BIO. */
+static void ERR_print_errors(BIO *bio) {
+ BIO_print_errors(bio);
+}
+#endif
+
/**
* Rounds n up to the nearest multiple of page_size
* @param n The value to round