Skip to content

Commit

Permalink
bootctl: avoid using __WORDSIZE macro
Browse files Browse the repository at this point in the history
__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
  • Loading branch information
floppym authored and yuwata committed Feb 15, 2023
1 parent f0353cf commit 7cd137e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/boot/bootctl-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down

0 comments on commit 7cd137e

Please sign in to comment.