]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Add be32toh
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>
Thu, 10 Oct 2024 14:54:13 +0000 (17:54 +0300)
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>
Fri, 11 Oct 2024 11:37:30 +0000 (14:37 +0300)
src/boot/efi/util.h

index 50025a34a83030d4c85419f4700adb7a7f86748e..e17402540c64e168ec1e061ec6fd6ef4942a5c68 100644 (file)
@@ -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