summaryrefslogtreecommitdiffstats
path: root/src/boot/util.h
diff options
context:
space:
mode:
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>2024-12-12 18:31:02 +0100
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>2024-12-16 19:02:54 +0100
commitf28cedfa311958bccaf0870b7ee567a9a2f4fc67 (patch)
tree95ec6ac07deaed106918dc5a97e82189e7d90664 /src/boot/util.h
parentboot: Deduplicate efi.h and efi-fundamental.h (diff)
downloadsystemd-f28cedfa311958bccaf0870b7ee567a9a2f4fc67.tar.xz
systemd-f28cedfa311958bccaf0870b7ee567a9a2f4fc67.zip
boot: Add chid.c to libefitest
Also fix compilation for testing CHID matching in userspace
Diffstat (limited to '')
-rw-r--r--src/boot/util.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/boot/util.h b/src/boot/util.h
index af14a0e31e..90da8ad69d 100644
--- a/src/boot/util.h
+++ b/src/boot/util.h
@@ -3,11 +3,14 @@
#include "efi.h"
#include "efi-string.h"
-#include "log.h"
#include "memory-util-fundamental.h"
-#include "proto/file-io.h"
#include "string-util-fundamental.h"
+#if SD_BOOT
+
+#include "log.h"
+#include "proto/file-io.h"
+
/* This is provided by the linker. */
extern uint8_t __executable_start[];
@@ -236,3 +239,11 @@ char16_t *get_extra_dir(const EFI_DEVICE_PATH *file_path);
#define bswap_16(x) __builtin_bswap16(x)
#define bswap_32(x) __builtin_bswap32(x)
+
+#else
+
+#include "alloc-util.h"
+
+#define xnew0(type, n) ASSERT_PTR(new0(type, n))
+
+#endif