arrfab / rpms / shim

Forked from rpms/shim 4 years ago
Clone

Blame SOURCES/0045-CryptLib-undefine-va_arg-and-friends-before-redefini.patch

e97c83
From a30276e095c10be69b5282d01c20cf5daf3fa671 Mon Sep 17 00:00:00 2001
e97c83
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
e97c83
Date: Tue, 12 Aug 2014 15:33:18 +0200
e97c83
Subject: [PATCH 45/74] CryptLib: undefine va_arg and friends before redefining
e97c83
 them
e97c83
e97c83
Upstream GNU-EFI contains changes to efistdarg.h resulting in the va_start,
e97c83
va_arg and va_end macros to be #defined unconditionally. Make sure we #undef
e97c83
them before overriding the definitions.
e97c83
e97c83
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
e97c83
---
e97c83
 Cryptlib/Include/OpenSslSupport.h | 8 ++++++++
e97c83
 1 file changed, 8 insertions(+)
e97c83
e97c83
diff --git a/Cryptlib/Include/OpenSslSupport.h b/Cryptlib/Include/OpenSslSupport.h
e97c83
index 5a2745d..9e56ced 100644
e97c83
--- a/Cryptlib/Include/OpenSslSupport.h
e97c83
+++ b/Cryptlib/Include/OpenSslSupport.h
e97c83
@@ -35,6 +35,14 @@ typedef VOID  *FILE;
e97c83
 // Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h
e97c83
 //
e97c83
 #if !defined(__CC_ARM) // if va_list is not already defined
e97c83
+/*
e97c83
+ * These are now unconditionally #defined by GNU_EFI's efistdarg.h,
e97c83
+ * so we should #undef them here before providing a new definition.
e97c83
+ */
e97c83
+#undef va_arg
e97c83
+#undef va_start
e97c83
+#undef va_end
e97c83
+
e97c83
 #define va_list   VA_LIST
e97c83
 #define va_arg    VA_ARG
e97c83
 #define va_start  VA_START
e97c83
-- 
e97c83
1.9.3
e97c83