| From 26979f738518404b1d3dc9ecdcf4fa5811412c49 Mon Sep 17 00:00:00 2001 |
| From: Thomas Petazzoni <thomas.petazzoni@bootlin.com> |
| Date: Tue, 24 Mar 2020 10:21:27 +0100 |
| Subject: [PATCH] efi/main.c: include <efisetjmp.h> |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| Building syslinux against gnu-efi 3.0.10 currently fails with: |
| |
| syslinux/efi/main.c:33:8: error: unknown type name ‘jmp_buf’ |
| 33 | static jmp_buf load_error_buf; |
| | ^~~~~~~ |
| syslinux/efi/main.c: In function ‘local_boot’: |
| syslinux/efi/main.c:189:5: warning: implicit declaration of function ‘longjmp’ [-Wimplicit-function-declaration] |
| 189 | longjmp(&load_error_buf, 1); |
| | ^~~~~~~ |
| syslinux/efi/main.c: In function ‘build_gdt’: |
| syslinux/efi/main.c:907:75: warning: taking address of packed member of ‘struct dt_desc’ may result in an unaligned pointer value [-Waddress-of-packed-member] |
| 907 | status = emalloc(gdt.limit, __SIZEOF_POINTER__ , (EFI_PHYSICAL_ADDRESS *)&gdt.base); |
| | ^~~~~~~~~ |
| syslinux/efi/main.c: In function ‘efi_main’: |
| syslinux/efi/main.c:1390:7: warning: implicit declaration of function ‘setjmp’ [-Wimplicit-function-declaration] |
| 1390 | if (!setjmp(&load_error_buf)) |
| | ^~~~~~ |
| make[3]: *** [syslinux/mk/efi.mk:63: main.o] Error 1 |
| |
| This is due to gnu-efi commit 486ba3c3bdd147b7d98159b9e650be60bce0f027 |
| ("Do not include efisetjmp.h on efi.h"), in which they state: |
| |
| Do not include efisetjmp.h on efi.h |
| |
| People than really want to use efisetjmp implementation can include |
| the header on their own. |
| |
| Signed-off-by: leo <leo.sartre@geebol.fr> |
| |
| So we act as specified, and include <efisetjmp.h> from efi/main.c. |
| |
| Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> |
| [Dario: make the patch to be applied with fuzz factor 0] |
| Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> |
| Upstream: https://www.syslinux.org/archives/2020-March/026621.html |
| --- |
| efi/main.c | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| diff --git a/efi/main.c b/efi/main.c |
| index 71d31a5c1f13..7dc7bca7aeba 100644 |
| --- a/efi/main.c |
| +++ b/efi/main.c |
| @@ -12,6 +12,7 @@ |
| #include <sys/ansi.h> |
| |
| #include "efi.h" |
| +#include <efisetjmp.h> |
| #include "fio.h" |
| #include "version.h" |
| |
| -- |
| 2.43.0 |
| |