summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/sd-journal.c2
-rw-r--r--src/shared/macro.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 57572d4f01..a2900fbee9 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -1868,7 +1868,7 @@ static int determine_change(sd_journal *j) {
}
_public_ int sd_journal_process(sd_journal *j) {
- uint8_t buffer[sizeof(struct inotify_event) + FILENAME_MAX];
+ uint8_t buffer[sizeof(struct inotify_event) + FILENAME_MAX] _alignas_(struct inotify_event);
bool got_something = false;
if (!j)
diff --git a/src/shared/macro.h b/src/shared/macro.h
index 1c0aa915ad..97eebbc88b 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -45,6 +45,7 @@
#define _hidden_ __attribute__ ((visibility("hidden")))
#define _weakref_(x) __attribute__((weakref(#x)))
#define _introspect_(x) __attribute__((section("introspect." x)))
+#define _alignas_(x) __attribute__((aligned(__alignof(x))))
#define XSTRINGIFY(x) #x
#define STRINGIFY(x) XSTRINGIFY(x)