lkml.org 
[lkml]   [2003]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] libaio-0.3.96 fix io_queue_wait compatibility
From
Date
libaio-0.3.96 fixes the dynamic linking problem I was having with
libaio-0.3.93, still it has broken backward compatibility with
io_queue_wait(). Here's patch that fixes it. I've tested binaries
compiled with libaio-0.3.13 and run them on libaio-0.3.96+patch on
2.6.0-test2-mm4.

Daniel

diff -rupN -X /home/daniel/dontdiff libaio-0.3.96/src/compat-0_1.c libaio-0.3.96.fix/src/compat-0_1.c
--- libaio-0.3.96/src/compat-0_1.c 2003-05-20 08:54:50.000000000 -0700
+++ libaio-0.3.96.fix/src/compat-0_1.c 2003-08-21 17:16:46.000000000 -0700
@@ -38,9 +38,12 @@ int compat0_1_io_cancel(io_context_t ctx
}

SYMVER(compat0_1_io_queue_wait, io_queue_wait, 0.1);
-int compat0_1_io_queue_wait(io_context_t ctx, struct iocb *iocb, const struct timespec *when)
+int compat0_1_io_queue_wait(io_context_t ctx, const struct timespec *when)
{
- return -ENOSYS;
+ struct timespec timeout;
+ if (when)
+ timeout = *when;
+ return io_getevents(ctx, 0, 0, NULL, when ? &timeout : NULL);
}

\
 
 \ /
  Last update: 2005-03-22 13:47    [from the cache]
©2003-2011 Jasper Spaans