From 8e3e60ffbf204d78b3cc8e23bb3e0b8385442467 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 13 Jan 2013 00:51:27 +0100 Subject: [PATCH] linux: only pack struct uv__epoll_event on x86_64 On i386, it does not need packing; it's 12 bytes packed or unpacked. On ARM, it's actively harmful: the struct is 12 bytes when packed and 16 bytes when unpacked. --- src/unix/linux/syscalls.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/unix/linux/syscalls.h b/src/unix/linux/syscalls.h index 71edde9c..e65eb458 100644 --- a/src/unix/linux/syscalls.h +++ b/src/unix/linux/syscalls.h @@ -69,10 +69,17 @@ #define UV__IN_DELETE_SELF 0x400 #define UV__IN_MOVE_SELF 0x800 +#if defined(__x86_64__) struct uv__epoll_event { __u32 events; __u64 data; } __attribute__((packed)); +#else +struct uv__epoll_event { + __u32 events; + __u64 data; +}; +#endif struct uv__inotify_event { __s32 wd;