Bug 117176 - cannot include libaio.h in C++ code
cannot include libaio.h in C++ code
Product: Fedora
Classification: Fedora
Component: libaio (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeffrey Moyer
Depends On:
  Show dependency treegraph
Reported: 2004-03-01 03:38 EST by Avi Kivity
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 0.3.99-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-05 10:06:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
allow C++ code to include libaio.h (696 bytes, patch)
2004-03-01 03:41 EST, Avi Kivity
no flags Details | Diff

  None (edit)
Description Avi Kivity 2004-03-01 03:38:28 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) 
How reproducible: 
Steps to Reproduce: 
1. echo '#include <libaio.h>' > x.cpp  
2. g++ x.cpp 
Actual results: 
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*' 
Expected results: 
Successful compilation 
Additional info:
Comment 1 Avi Kivity 2004-03-01 03:41:32 EST
Created attachment 98153 [details]
allow C++ code to include libaio.h
Comment 2 Jeffrey Moyer 2004-04-14 14:24:04 EDT
Thanks, I've included your fixes in the latest libaio, version
0.3.99-1.  This is now present in rawhide.
Comment 3 Avi Kivity 2004-04-21 10:53:59 EDT
Latest rawhide works for me.

Note You need to log in before you can comment on or make changes to this bug.