Bug 117176

Summary: cannot include libaio.h in C++ code
Product: [Fedora] Fedora Reporter: Avi Kivity <avi>
Component: libaioAssignee: Jeff Moyer <jmoyer>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.3.99-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-05 14:06:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
allow C++ code to include libaio.h none

Description Avi Kivity 2004-03-01 08:38:28 UTC
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) 
 
 
libaio-devel-0.3.98-2 
 
 
How reproducible: 
 
Always 
 
 
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 08:41:32 UTC
Created attachment 98153 [details]
allow C++ code to include libaio.h

Comment 2 Jeff Moyer 2004-04-14 18:24:04 UTC
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 14:53:59 UTC
Latest rawhide works for me.