1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
Make libaio support a proper option and update the checks to support
both new and old versions of libaio.
http://bugs.gentoo.org/103427
--- strace/configure.ac
+++ strace/configure.ac
@@ -170,6 +170,26 @@
struct stat.st_rdev])
AC_STAT64
+AC_ARG_ENABLE(libaio,
+ AC_HELP_STRING([--enable-libaio],[enable support for libaio @<:@default=auto@:>@]),
+ [enable_libaio=$enableval],
+ [enable_libaio=auto]
+)
+if test "x$enable_libaio" != "xno" ; then
+ AC_CHECK_HEADER([libaio.h],[have_libaio=yes],[have_libaio=no])
+ if test "x$enable_libaio$have_libaio" = "xyesno" ; then
+ AC_MSG_ERROR(Could not detect libaio.h)
+ elif test "x$have_libaio" = "xyes" ; then
+ AC_DEFINE(HAVE_LIBAIO_H, 1, [System has libaio.h])
+ AC_CHECK_MEMBERS([
+ struct iocb.data,
+ struct iocb.aio_data,
+ struct iocb.key,
+ struct iocb.aio_key],
+ [], [], [#include <libaio.h>])
+ fi
+fi
+
AC_TYPE_SIGNAL
AC_TYPE_UID_T
AC_TYPE_MODE_T
--- strace/desc.c
+++ strace/desc.c
@@ -767,7 +767,11 @@
continue;
}
tprintf("{%p, %u, %hu, %hu, %d}",
+#ifdef HAVE_STRUCT_IOCB_AIO_DATA
+ iocb.aio_data, iocb.aio_data,
+#else
iocb.data, iocb.key,
+#endif
iocb.aio_lio_opcode,
iocb.aio_reqprio, iocb.aio_fildes);
}
@@ -793,7 +797,11 @@
#ifdef HAVE_LIBAIO_H
if (umove(tcp, tcp->u_arg[1], &iocb) == 0) {
tprintf("{%p, %u, %hu, %hu, %d}, ",
+#ifdef HAVE_STRUCT_IOCB_AIO_DATA
+ iocb.aio_data, iocb.aio_data,
+#else
iocb.data, iocb.key,
+#endif
iocb.aio_lio_opcode,
iocb.aio_reqprio, iocb.aio_fildes);
} else
|