diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 8313e3c3160..0db2bd4ffce 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -4610,15 +4610,6 @@ NTSTATUS WINAPI NtSetInformationFile( HANDLE handle, IO_STATUS_BLOCK *io, * Asynchronous file I/O * */ -typedef NTSTATUS async_callback_t( void *user, IO_STATUS_BLOCK *io, NTSTATUS status ); - -struct async_fileio -{ - async_callback_t *callback; /* must be the first field */ - struct async_fileio *next; - HANDLE handle; -}; - struct async_fileio_read { struct async_fileio io; diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index d153fdce0be..10f53bea8ab 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -390,12 +390,12 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO case APC_ASYNC_IO: { IO_STATUS_BLOCK *iosb = wine_server_get_ptr( call->async_io.sb ); - NTSTATUS (**user)(void *, IO_STATUS_BLOCK *, NTSTATUS) = wine_server_get_ptr( call->async_io.user ); + struct async_fileio *user = wine_server_get_ptr( call->async_io.user ); void *saved_frame = get_syscall_frame(); void *frame; result->type = call->type; - result->async_io.status = (*user)( user, iosb, call->async_io.status ); + result->async_io.status = user->callback( user, iosb, call->async_io.status ); if ((frame = get_syscall_frame()) != saved_frame) { diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index bd00d4e9d42..3c23562b7a0 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -75,6 +75,15 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void) return (struct ntdll_thread_data *)&NtCurrentTeb()->GdiTebBatch; } +typedef NTSTATUS async_callback_t( void *user, IO_STATUS_BLOCK *io, NTSTATUS status ); + +struct async_fileio +{ + async_callback_t *callback; + struct async_fileio *next; + HANDLE handle; +}; + static const SIZE_T page_size = 0x1000; static const SIZE_T teb_size = 0x3000; /* TEB64 + TEB32 */ static const SIZE_T signal_stack_mask = 0xffff;