summaryrefslogtreecommitdiffstats
path: root/src/boot/efi/util.h
diff options
context:
space:
mode:
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>2024-10-10 16:54:13 +0200
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>2024-10-11 13:37:30 +0200
commit60c75a2a41264e5e07bb4d6b4dedaaf2cf44021e (patch)
treebd0c3352c3b4b8d6d1a86e774ef44c2749b7c696 /src/boot/efi/util.h
parentMerge pull request #34718 from poettering/efi-smbios-tweak (diff)
downloadsystemd-60c75a2a41264e5e07bb4d6b4dedaaf2cf44021e.tar.xz
systemd-60c75a2a41264e5e07bb4d6b4dedaaf2cf44021e.zip
boot: Add be32toh
Diffstat (limited to '')
-rw-r--r--src/boot/efi/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h
index 50025a34a8..e17402540c 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