#include <sys/inotify.h>
#include <sys/utsname.h>
-#include "udev.h"
-#include "udev-util.h"
-#include "rtnl-util.h"
#include "sd-daemon.h"
+#include "rtnl-util.h"
#include "cgroup-util.h"
#include "dev-setup.h"
#include "fileio.h"
+#include "selinux-util.h"
+#include "udev.h"
+#include "udev-util.h"
static struct udev_rules *rules;
static struct udev_ctrl *udev_ctrl;
}
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;