PKGBUILDs/extra/gnu-efi-libs/0002-From-Pete-Batard-pete-akeo.ie.patch
2016-03-30 02:14:04 +00:00

60 lines
2 KiB
Diff

From c875f9935c177161eecf4e7efddfe4cd52c038b7 Mon Sep 17 00:00:00 2001
From: Nigel Croxon <nigel.croxon@hpe.com>
Date: Thu, 17 Sep 2015 08:22:39 -0400
Subject: [PATCH 02/10] From: Pete Batard <pete@akeo.ie> Date: Wed, 16 Sep 2015
18:26:28 +0100 Subject: [PATCH] Fix VS2015 warnings
* Currently, Visual Studio 2015 generates a lot of warnings such as:
gnu-efi\inc\efipciio.h(7): warning C4091: 'typedef ': ignored on left of '_EFI_PCI_IO' when no variable is declared
* To address this, gnu-efi should define the INTERFACE_DECL() for MS compilers as it does for GNU
Signed-off-by: Pete Batard <pete@akeo.ie>
Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com>
---
inc/ia32/efibind.h | 2 +-
inc/ia64/efibind.h | 2 +-
inc/x86_64/efibind.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/inc/ia32/efibind.h b/inc/ia32/efibind.h
index b8db581..1b11f10 100644
--- a/inc/ia32/efibind.h
+++ b/inc/ia32/efibind.h
@@ -272,7 +272,7 @@ typedef uint32_t UINTN;
#ifdef NO_INTERFACE_DECL
#define INTERFACE_DECL(x)
#else
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(_MSC_EXTENSIONS)
#define INTERFACE_DECL(x) struct x
#else
#define INTERFACE_DECL(x) typedef struct x
diff --git a/inc/ia64/efibind.h b/inc/ia64/efibind.h
index 6f9a6f7..b415461 100644
--- a/inc/ia64/efibind.h
+++ b/inc/ia64/efibind.h
@@ -219,7 +219,7 @@ void __mf (void);
#ifdef NO_INTERFACE_DECL
#define INTERFACE_DECL(x)
#else
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(_MSC_EXTENSIONS)
#define INTERFACE_DECL(x) struct x
#else
#define INTERFACE_DECL(x) typedef struct x
diff --git a/inc/x86_64/efibind.h b/inc/x86_64/efibind.h
index 6bbd337..5ee620b 100644
--- a/inc/x86_64/efibind.h
+++ b/inc/x86_64/efibind.h
@@ -284,7 +284,7 @@ typedef uint64_t UINTN;
#ifdef NO_INTERFACE_DECL
#define INTERFACE_DECL(x)
#else
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined(_MSC_EXTENSIONS)
#define INTERFACE_DECL(x) struct x
#else
#define INTERFACE_DECL(x) typedef struct x
--
2.5.0