Fix data ordering bug causing problems on Debian Jessie

Got very odd results on Debian Jessie when having the uev_private_t last
in uev_t.  Turns out that when uev.c set "w->active = 0;" the w->fd data
member was written to instead.

Placing the private data first in uev_t is better practise, generally a
good thing for linked lists built on the BSD sys/queue.h API, looks a
lot better, but foremost works.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-07-19 04:40:30 +02:00
parent 6ffa76c2f8
commit 1480976724
+4 -2
View File
@@ -41,10 +41,12 @@
/* Event watcher */
typedef struct uev {
/* Private data for libuEv internal engine */
uev_private_t type;
/* Public data for users to reference */
int fd;
uev_ctx_t *ctx;
uev_private_t type;
} uev_t;
/* Generic callback for watchers */