Blame SOURCES/0205-blscfg-fix-compilation-on-EFI-and-EMU.patch

8631a2
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
8631a2
From: Will Thompson <wjt@endlessm.com>
8631a2
Date: Thu, 12 Jul 2018 19:00:42 +0100
8631a2
Subject: [PATCH] blscfg: fix compilation on !EFI and !EMU
8631a2
MIME-Version: 1.0
8631a2
Content-Type: text/plain; charset=UTF-8
8631a2
Content-Transfer-Encoding: 8bit
8631a2
8631a2
Neither GRUB_MACHINE_EFI nor GRUB_MACHINE_EMU are defined when compiling
8631a2
for (eg) i386-pc. In this case, #elif GRUB_MACHINE_EMU is an error:
8631a2
8631a2
  commands/blscfg.c: In function ‘grub_cmd_blscfg’:
8631a2
  commands/blscfg.c:835:7: error: "GRUB_MACHINE_EMU" is not defined [-Werror=undef]
8631a2
   #elif GRUB_MACHINE_EMU
8631a2
         ^~~~~~~~~~~~~~~~
8631a2
8631a2
Signed-off-by: Will Thompson <wjt@endlessm.com>
8631a2
---
8631a2
 grub-core/commands/blscfg.c | 2 +-
8631a2
 1 file changed, 1 insertion(+), 1 deletion(-)
8631a2
8631a2
diff --git a/grub-core/commands/blscfg.c b/grub-core/commands/blscfg.c
f6e916
index 11a356de8..53676576b 100644
8631a2
--- a/grub-core/commands/blscfg.c
8631a2
+++ b/grub-core/commands/blscfg.c
8631a2
@@ -843,7 +843,7 @@ grub_cmd_blscfg (grub_extcmd_context_t ctxt UNUSED,
8631a2
   info.platform = PLATFORM_EFI;
8631a2
   grub_dprintf ("blscfg", "scanning /EFI/\n");
8631a2
   r = fs->dir (dev, "/EFI/", find_entry, &info;;
8631a2
-#elif GRUB_MACHINE_EMU
8631a2
+#elif defined(GRUB_MACHINE_EMU)
8631a2
   info.platform = PLATFORM_EMU;
8631a2
   grub_dprintf ("blscfg", "scanning %s%s\n", GRUB_BOOT_DEVICE,
8631a2
 		GRUB_BLS_CONFIG_PATH);