summaryrefslogtreecommitdiff
path: root/src/fundamental/macro-fundamental.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-06-01 14:51:44 +0900
committerGitHub <noreply@github.com>2022-06-01 14:51:44 +0900
commit9db25d01efe2ae082c11f017b028d2c4ee7fa16d (patch)
tree95cb264a327ea5ad52782229bfd2c256fbe1c7d0 /src/fundamental/macro-fundamental.h
parentcd25e170014783503d5035ef4b067e7b00c01221 (diff)
parenta452cfd77bda45c1448a401a43a3368d8d2a33db (diff)
downloadsystemd-9db25d01efe2ae082c11f017b028d2c4ee7fa16d.tar.gz
Merge pull request #23531 from yuwata/sd-bus-drop-version-2
sd-bus: drop version 2 format support
Diffstat (limited to 'src/fundamental/macro-fundamental.h')
-rw-r--r--src/fundamental/macro-fundamental.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h
index bb9e779dd2..f78c62ef25 100644
--- a/src/fundamental/macro-fundamental.h
+++ b/src/fundamental/macro-fundamental.h
@@ -320,6 +320,14 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
return ((l + ali - 1) & ~(ali - 1));
}
+#define ALIGN4(l) ALIGN_TO(l, 4)
+#define ALIGN8(l) ALIGN_TO(l, 8)
+#ifndef 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
+
/* Same as ALIGN_TO but callable in constant contexts. */
#define CONST_ALIGN_TO(l, ali) \
__builtin_choose_expr( \