summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Janssen <medhefgo@web.de>2023-01-07 09:14:41 +0100
committerJan Janssen <medhefgo@web.de>2023-02-21 21:07:04 +0100
commita4ab05e296a605cff9d3d42d9c80dac910530a96 (patch)
tree6b086457addf70f9c1f4b2a392ad49c6abd04959
parentstub: Fix unaligned read (diff)
downloadsystemd-a4ab05e296a605cff9d3d42d9c80dac910530a96.tar.xz
systemd-a4ab05e296a605cff9d3d42d9c80dac910530a96.zip
fundamental: Drop some unnecessary ifdefs
With gnu-efi headers gone, we don't need these guards anymore.
-rw-r--r--src/fundamental/macro-fundamental.h3
-rw-r--r--src/fundamental/string-util-fundamental.c2
-rw-r--r--src/fundamental/string-util-fundamental.h2
3 files changed, 0 insertions, 7 deletions
diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h
index c4ad957588..fa5b5d221a 100644
--- a/src/fundamental/macro-fundamental.h
+++ b/src/fundamental/macro-fundamental.h
@@ -339,11 +339,8 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
#define ALIGN2_PTR(p) ((void*) ALIGN2((uintptr_t) p))
#define ALIGN4_PTR(p) ((void*) ALIGN4((uintptr_t) p))
#define ALIGN8_PTR(p) ((void*) ALIGN8((uintptr_t) p))
-#if !SD_BOOT
-/* libefi also provides ALIGN, and we do not use them in sd-boot explicitly. */
#define ALIGN(l) ALIGN_TO(l, sizeof(void*))
#define ALIGN_PTR(p) ((void*) ALIGN((uintptr_t) (p)))
-#endif
/* Checks if the specified pointer is aligned as appropriate for the specific type */
#define IS_ALIGNED16(p) (((uintptr_t) p) % __alignof__(uint16_t) == 0)
diff --git a/src/fundamental/string-util-fundamental.c b/src/fundamental/string-util-fundamental.c
index 484131d72a..a5bafc63f4 100644
--- a/src/fundamental/string-util-fundamental.c
+++ b/src/fundamental/string-util-fundamental.c
@@ -20,7 +20,6 @@ sd_char *startswith(const sd_char *s, const sd_char *prefix) {
return (sd_char*) s + l;
}
-#if !SD_BOOT
sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) {
size_t l;
@@ -33,7 +32,6 @@ sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) {
return (sd_char*) s + l;
}
-#endif
sd_char* endswith(const sd_char *s, const sd_char *postfix) {
size_t sl, pl;
diff --git a/src/fundamental/string-util-fundamental.h b/src/fundamental/string-util-fundamental.h
index f55dcbf56a..9019542b16 100644
--- a/src/fundamental/string-util-fundamental.h
+++ b/src/fundamental/string-util-fundamental.h
@@ -58,9 +58,7 @@ static inline size_t strlen_ptr(const sd_char *s) {
}
sd_char *startswith(const sd_char *s, const sd_char *prefix) _pure_;
-#if !SD_BOOT
sd_char *startswith_no_case(const sd_char *s, const sd_char *prefix) _pure_;
-#endif
sd_char *endswith(const sd_char *s, const sd_char *postfix) _pure_;
sd_char *endswith_no_case(const sd_char *s, const sd_char *postfix) _pure_;