arrfab / rpms / shim

Forked from rpms/shim 4 years ago
Clone

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

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