Bug 117176 - cannot include libaio.h in C++ code
Summary: cannot include libaio.h in C++ code
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libaio
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Moyer
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-03-01 08:38 UTC by Avi Kivity
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 0.3.99-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-04-05 14:06:41 UTC
Type: ---
Embargoed:


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

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.


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