Skip to content

Commit

Permalink
Add patch to fix build error
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Żyjewski <[email protected]>
  • Loading branch information
TomaszAIR committed Feb 8, 2023
1 parent afd6446 commit a9b0878
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
49 changes: 49 additions & 0 deletions 1145-include-grub-sb.h-remove-export-grub_efi_get_secureb.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From a4e88f8851c57dc01ebdfeaaaa80ed28c3178a0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomasz=20=C5=BByjewski?= <[email protected]>
Date: Wed, 8 Feb 2023 10:15:33 +0100
Subject: [PATCH] include: grub: sb.h: remove export grub_efi_get_secureboot
function
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This is done to fix following build error

../../grub-core/loader/i386/linux.c:477:1: error: static declaration of
'grub_efi_get_secureboot' follows non-static declaration
477 | grub_efi_get_secureboot (void)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../include/grub/err.h:23,
from ../../include/grub/file.h:23,
from ../../include/grub/loader.h:23,
from ../../grub-core/loader/i386/linux.c:19:
../../include/grub/efi/sb.h:32:14: note: previous declaration of
'grub_efi_get_secureboot' was here
32 | EXPORT_FUNC (grub_efi_get_secureboot) (void);
| ^~~~~~~~~~~~~~~~~~~~~~~
../../include/grub/symbol.h:68:25: note: in definition of macro
'EXPORT_FUNC'
68 | # define EXPORT_FUNC(x) x

Signed-off-by: Tomasz Żyjewski <[email protected]>
---
include/grub/efi/sb.h | 3 ---
1 file changed, 3 deletions(-)

diff --git a/include/grub/efi/sb.h b/include/grub/efi/sb.h
index 30c4335bb123..9ecfc4a88d67 100644
--- a/include/grub/efi/sb.h
+++ b/include/grub/efi/sb.h
@@ -28,9 +28,6 @@
#define GRUB_EFI_SECUREBOOT_MODE_ENABLED 3

#ifdef GRUB_MACHINE_EFI
-extern grub_uint8_t
-EXPORT_FUNC (grub_efi_get_secureboot) (void);
-
extern void
grub_shim_lock_verifier_setup (void);
#else
--
2.25.1

1 change: 1 addition & 0 deletions grub2.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ Patch1141: 1141-grub-core-loader-multiboot_mbi2.c-allocate-event-log.patch
Patch1142: 1142-i386-linux.c-allocate-more-memory-for-the-AP-wake-bl.patch
Patch1143: 1143-loader-multiboot_mbi2.c-use-safe-function-and-UP_TO_.patch
Patch1144: 1144-loader-multiboot_elfxx.c-use-safe-function.patch
Patch1145: 1145-include-grub-sb.h-remove-export-grub_efi_get_secureb.patch

BuildRequires: autoconf
BuildRequires: automake
Expand Down

0 comments on commit a9b0878

Please sign in to comment.