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.
This commit is contained in:
Ben Noordhuis 2013-01-13 00:51:27 +01:00
parent 9cd9bd33b4
commit 8e3e60ffbf

View File

@ -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;