Red Hat Bugzilla – Bug 117176
cannot include libaio.h in C++ code
Last modified: 2007-11-30 17:10:37 EST
Description of problem:
libaio.h is missing the extern "C" declaration, and contains invalid C++ code
(assignment from a pointer to a function into a void pointer)
Steps to Reproduce:
1. echo '#include <libaio.h>' > x.cpp
2. g++ x.cpp
In file included from x.cpp:1:
/usr/include/libaio.h: In function `void io_set_callback(iocb*, void
(*)(io_context*, iocb*, long int, long int))':
/usr/include/libaio.h:142: invalid conversion from `void (*)(io_context*,
iocb*, long int, long int)' to `void*'
Created attachment 98153 [details]
allow C++ code to include libaio.h
Thanks, I've included your fixes in the latest libaio, version
0.3.99-1. This is now present in rawhide.
Latest rawhide works for me.