diff options
author | Shawn Paul Landden <shawn@churchofgit.com> | 2014-12-29 11:05:19 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-12-29 11:05:19 -0500 |
commit | 96ce74918fc9f535fc04d53e960862cdeb995222 (patch) | |
tree | 261a24a2b2067c8a8a6ec329e82852a05580b672 /src/udev | |
parent | 9d06e6560812229dc20a841057f2dc9d4f346723 (diff) |
util: fix strict aliasing violations in use of struct inotify_event v5
There is alot of cleanup that will have to happen to turn on
-fstrict-aliasing, but I think our code should be "correct" to the rule.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udevd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index b519dc4c99..092fc95db3 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -807,11 +807,11 @@ static int synthesize_change(struct udev_device *dev) { } static int handle_inotify(struct udev *udev) { - uint8_t buffer[INOTIFY_EVENT_MAX] _alignas_(struct inotify_event); + union inotify_event_buffer buffer; struct inotify_event *e; ssize_t l; - l = read(fd_inotify, buffer, sizeof(buffer)); + l = read(fd_inotify, &buffer, sizeof(buffer)); if (l < 0) { if (errno == EAGAIN || errno == EINTR) return 0; |