From 86e20726c1e84dde576854b28c1912367753ca8a Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 18 Apr 2011 05:59:10 -0600 Subject: [PATCH] Portability: aio.h suffers from GCC-specific hacks on Linux 64-bit 64-bit file support on 32-bit systems uses GCC-specific #define to convert the functions to 64-bit API but omits the struct aiocb passed as paremeter. GCC seems not to mind, but non-GCC compilers barf on the invalid types. --- src/DiskIO/AIO/async_io.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/DiskIO/AIO/async_io.h b/src/DiskIO/AIO/async_io.h index 24757800c8..46d4b941cb 100644 --- a/src/DiskIO/AIO/async_io.h +++ b/src/DiskIO/AIO/async_io.h @@ -34,7 +34,6 @@ typedef enum { AQ_ENTRY_WRITE } async_queue_entry_type_t; - typedef struct _async_queue_entry async_queue_entry_t; typedef struct _async_queue async_queue_t; @@ -47,7 +46,12 @@ struct _async_queue_entry { async_queue_entry_state_t aq_e_state; async_queue_entry_type_t aq_e_type; + /* 64-bit environments with non-GCC complain about the type mismatch on Linux */ +#if defined(__USE_FILE_OFFSET64) && !defined(__GNUC__) + struct aiocb64 aq_e_aiocb; +#else struct aiocb aq_e_aiocb; +#endif AIODiskFile *theFile; void *aq_e_callback_data; FREE *aq_e_free; -- 2.47.3