1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

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
This commit is contained in:
Mike Gilbert 2023-02-14 14:46:25 -05:00 committed by Yu Watanabe
parent f0353cf2e9
commit 7cd137e647

View File

@ -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;