Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 1 | From 38c87ca2ab96d085158485ecfc46c7cb6af0f166 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> |
| 3 | Date: Fri, 3 Jun 2022 09:32:02 +0200 |
| 4 | Subject: [PATCH] sha256: fix compilation on efi-ia32 |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | /usr/bin/gcc -c ../src/fundamental/sha256.c -o src/boot/efi/sha256.c.o -Wno-format-signedness -Wno-missing-field-initializers -Wno-unused-parameter -Wdate-time -Wendif-labels -Werror=format=2 -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wno-unused-result -fno-stack-protector -fno-strict-aliasing -fpic -fwide-exec-charset=UCS2 -Wall -Wextra -Wsign-compare -nostdlib -std=gnu99 -ffreestanding -fshort-wchar -fvisibility=hidden -isystem /usr/include/efi -isystem /usr/include/efi/ia32 -I /builddir/build/BUILD/systemd-stable-250.7/src/fundamental -DSD_BOOT -DGNU_EFI_USE_MS_ABI -include src/boot/efi/efi_config.h -include version.h -mno-sse -mno-mmx -flto -O2 -flto=auto |
| 10 | ../src/fundamental/sha256.c: In function ‘sha256_finish_ctx’: |
| 11 | ../src/fundamental/sha256.c:61:25: error: ‘false’ undeclared (first use in this function) |
| 12 | 61 | # define UNALIGNED_P(p) false |
| 13 | | ^~~~~ |
| 14 | ../src/fundamental/sha256.c:136:21: note: in expansion of macro ‘UNALIGNED_P’ |
| 15 | 136 | if (UNALIGNED_P(resbuf)) |
| 16 | | ^~~~~~~~~~~ |
| 17 | ../src/fundamental/sha256.c:32:1: note: ‘false’ is defined in header ‘<stdbool.h>’; did you forget to ‘#include <stdbool.h>’? |
| 18 | 31 | #include "sha256.h" |
| 19 | +++ |+#include <stdbool.h> |
| 20 | 32 | |
| 21 | ... |
| 22 | |
| 23 | Upstream-Status: Backport |
| 24 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame^] | 25 | |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 26 | --- |
| 27 | src/fundamental/sha256.c | 2 +- |
| 28 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 29 | |
| 30 | diff --git a/src/fundamental/sha256.c b/src/fundamental/sha256.c |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame^] | 31 | index cd16aec4dd..58b1a80d33 100644 |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 32 | --- a/src/fundamental/sha256.c |
| 33 | +++ b/src/fundamental/sha256.c |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame^] | 34 | @@ -58,7 +58,7 @@ |
Andrew Geissler | 78b7279 | 2022-06-14 06:47:25 -0500 | [diff] [blame] | 35 | # define UNALIGNED_P(p) (((size_t) p) % sizeof(uint32_t) != 0) |
| 36 | # endif |
| 37 | #else |
| 38 | -# define UNALIGNED_P(p) false |
| 39 | +# define UNALIGNED_P(p) sd_false |
| 40 | #endif |
| 41 | |
| 42 | /* This array contains the bytes used to pad the buffer to the next |