]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Add be16toh, le16toh and le32toh
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>
Mon, 31 Mar 2025 17:37:13 +0000 (20:37 +0300)
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>
Wed, 7 May 2025 15:10:51 +0000 (18:10 +0300)
src/boot/util.h

index 115258d5ee74517bcd87a5480dc0ffd164f52d4d..2145b6e2589b643d2bd0cb146a220941cf1b94a2 100644 (file)
@@ -233,7 +233,10 @@ 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 be16toh(x) __builtin_bswap16(x)
 #  define be32toh(x) __builtin_bswap32(x)
+#  define le16toh(x) (x)
+#  define le32toh(x) (x)
 #else
 #  error "Unexpected byte order in EFI mode?"
 #endif