From: Yu Watanabe Date: Fri, 16 May 2025 17:45:01 +0000 (+0900) Subject: sd-event: move flex array in struct inotify_data to the end X-Git-Tag: v258-rc1~365^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbef4dd4f23517abfc73b35f0bdf004d2f8f4805;p=thirdparty%2Fsystemd.git sd-event: move flex array in struct inotify_data to the end --- diff --git a/src/libsystemd/sd-event/event-source.h b/src/libsystemd/sd-event/event-source.h index 3be9a0e6c12..5fef3b1ac97 100644 --- a/src/libsystemd/sd-event/event-source.h +++ b/src/libsystemd/sd-event/event-source.h @@ -220,10 +220,6 @@ struct inotify_data { Hashmap *inodes; /* The inode_data structures keyed by dev+ino */ Hashmap *wd; /* The inode_data structures keyed by the watch descriptor for each */ - /* The buffer we read inotify events into */ - union inotify_event_buffer buffer; - size_t buffer_filled; /* fill level of the buffer */ - /* How many event sources are currently marked pending for this inotify. We won't read new events off the * inotify fd as long as there are still pending events on the inotify (because we have no strategy of queuing * the events locally if they can't be coalesced). */ @@ -237,4 +233,9 @@ struct inotify_data { /* A linked list of all inotify objects with data already read, that still need processing. We keep this list * to make it efficient to figure out what inotify objects to process data on next. */ LIST_FIELDS(struct inotify_data, buffered); + + /* The buffer we read inotify events into */ + size_t buffer_filled; /* fill level of the buffer */ + union inotify_event_buffer buffer; /* struct inotify_event in union inotify_event_buffer has flex + * array. Hence, this must be at the end. */ };