libaio: use container_of() instead of silly casting

Signed-off-by: Jens Axboe <axboe@kernel.dk>

Conflicts:
	engines/libaio.c

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/engines/libaio.c b/engines/libaio.c
index bc459da..f17260d 100644
--- a/engines/libaio.c
+++ b/engines/libaio.c
@@ -14,8 +14,6 @@
 
 #ifdef FIO_HAVE_LIBAIO
 
-#define ev_to_iou(ev)	(struct io_u *) ((unsigned long) (ev)->obj)
-
 struct libaio_data {
 	io_context_t aio_ctx;
 	struct io_event *aio_events;
@@ -62,7 +60,7 @@
 	struct io_u *io_u;
 
 	ev = ld->aio_events + event;
-	io_u = ev_to_iou(ev);
+	io_u = container_of(ev->obj, struct io_u, iocb);
 
 	if (ev->res != io_u->xfer_buflen) {
 		if (ev->res > io_u->xfer_buflen)