From 7cd137e6478746eb02a516cef85ade0da618b017 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Tue, 14 Feb 2023 14:46:25 -0500 Subject: [PATCH] bootctl: avoid using __WORDSIZE macro __WORDSIZE does not seem to be documented anywhere, and is probably meant to be used internally by glibc headers. In systemd, it was only being used in warning messages. We can avoid using it by rewording the messages slightly. Fixes a build error with musl libc. Bug: https://bugs.gentoo.org/894430 --- src/boot/bootctl-util.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/boot/bootctl-util.c b/src/boot/bootctl-util.c index f89721244a..62c0b64406 100644 --- a/src/boot/bootctl-util.c +++ b/src/boot/bootctl-util.c @@ -41,7 +41,9 @@ const char *get_efi_arch(void) { if (r == -ENOENT) return EFI_MACHINE_TYPE_NAME; if (r < 0) { - log_warning_errno(r, "Error reading EFI firmware word size, assuming '%i': %m", __WORDSIZE); + log_warning_errno(r, + "Error reading EFI firmware word size, assuming machine type '%s': %m", + EFI_MACHINE_TYPE_NAME); return EFI_MACHINE_TYPE_NAME; } @@ -51,9 +53,9 @@ const char *get_efi_arch(void) { return "ia32"; log_warning( - "Unknown EFI firmware word size '%s', using default word size '%i' instead.", + "Unknown EFI firmware word size '%s', using machine type '%s'.", platform_size, - __WORDSIZE); + EFI_MACHINE_TYPE_NAME); #endif return EFI_MACHINE_TYPE_NAME;