From: anonymix007 <48598263+anonymix007@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:54:13 +0000 (+0300) Subject: boot: Add be32toh X-Git-Tag: v257-rc1~254^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=60c75a2a41264e5e07bb4d6b4dedaaf2cf44021e;p=thirdparty%2Fsystemd.git boot: Add be32toh --- diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index 50025a34a83..e17402540c6 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -188,3 +188,9 @@ static inline bool efi_guid_equal(const EFI_GUID *a, const EFI_GUID *b) { void *find_configuration_table(const EFI_GUID *guid); char16_t *get_extra_dir(const EFI_DEVICE_PATH *file_path); + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define be32toh(x) __builtin_bswap32(x) +#else +# error "Unexpected byte order in EFI mode?" +#endif