Bug 146870 - "io_setup( )/io_destroy( )" have not been defined in <linux/aio.h>.
Summary: "io_setup( )/io_destroy( )" have not been defined in <linux/aio.h>.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: man-pages
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Ivana Varekova
QA Contact:
URL:
Whiteboard:
: 165217 (view as bug list)
Depends On:
Blocks: 156322 165217
TreeView+ depends on / blocked
 
Reported: 2005-02-02 11:58 UTC by L3support
Modified: 2007-11-30 22:07 UTC (History)
7 users (show)

Fixed In Version: RHBA-2005-356
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 13:39:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:356 0 qe-ready SHIPPED_LIVE man-pages bug fix update 2005-10-05 04:00:00 UTC

Description L3support 2005-02-02 11:58:01 UTC
Description of problem:

Result is compile error, 
when we compiled our code(test.c) calling io_setup( )/io_destroy.

Error message is as follows.
---------------------------------------------------
aio.c:2:23: linux/aio.h: No such file or directory
---------------------------------------------------

So, we searched aio.h.
---------------------------------------------------
# find / -name aio.h
/lib/modules/2.6.9-1.648_EL/build/include/linux/aio.h
/usr/src/debug/kernel-2.6.9/linux-2.6.9/include/linux/aio.h
/usr/include/aio.h
---------------------------------------------------

We could not find io_setup()/io_destroy() in the headers.

Version-Release number of selected component (if applicable):
gcc-3.4.2-6.fc3
glibc-headers-2.3.3-73

How reproducible:
always

Steps to Reproduce:
1. see aio.h
2.
3.
  
Actual results:
"io_setup()/io_destroy()" have not been defined in aio.h.

Expected results:
"io_setup()/io_destroy()" have been defined in aio.h.

Additional info:
# cat test.c
---------------------------------------------------
#include <stdio.h>
#include <linux/aio.h>

main(){
int           nr_events;
long          rc;
char          *ctxp;

    nr_events = 4;
    rc = io_setup( nr_events, ctxp );
    rc = io_destroy( ctxp );
}
---------------------------------------------------

# man io_setup
---------------------------------------------------
IO_SETUP(2)                Linux Programmer's Manual              
IO_SETUP(2)

NAME
       io_setup - Create an asynchronous I/O context

SYNOPSIS
       #include <linux/aio.h>

       long io_setup (unsigned nr_events, aio_context_t *ctxp);
                            : 
                            : 
                          (snip)
                            : 
                            : 

Linux 2.4                         2003-02-21                      
IO_SETUP(2)
---------------------------------------------------

Comment 1 Jay Turner 2005-02-03 10:23:43 UTC
This is actually a problem with the man-pages and not gcc or AIO or anything. 
Those two functions moved to the libaio.h file from the libaio-devel package. 
So the synopsis above should be

#include <libaio.h>

Changing component.

Comment 2 L3support 2005-02-07 09:09:35 UTC
We wish you modify man-page.

[io_setup()]

Actual results:
 - #include <linux/aio.h>
 - long io_setup (unsigned nr_events, aio_context_t *ctxp);

Expected results:
 - #include <libaio.h>
 - int io_setup(int maxevents, io_context_t *ctxp);

Additional info:
$ man io_setup
-----------------------------------------------------------------
SYNOPSIS
       #include <linux/aio.h>

       long io_setup (unsigned nr_events, aio_context_t *ctxp);
-----------------------------------------------------------------

$ less /usr/include/libaio.h
-----------------------------------------------------------------
extern int io_setup(int maxevents, io_context_t *ctxp);
-----------------------------------------------------------------

[io_destroy()]

Actual results:
 - #include <linux/aio.h>
 - long io_destroy (aio_context_t ctx);

Expected results:
 - #include <libaio.h>
 - int io_destroy(io_context_t ctx);

Additional info:
-----------------------------------------------------------------
SYNOPSIS
       #include <linux/aio.h>

       long io_destroy (aio_context_t ctx);
-----------------------------------------------------------------

$ less /usr/include/libaio.h
-----------------------------------------------------------------
extern int io_destroy(io_context_t ctx);
-----------------------------------------------------------------

Comment 3 Jiri Ryska 2005-04-04 15:34:06 UTC
fixed in man-pages-1.67-5.EL4

Comment 4 Keiichi Mori 2005-04-05 00:17:23 UTC
This issue affects not only English man page but also
other language man page (though I've confirmed only for English and Japanese).
Please make sure the fix has been done for the man pages of all language
we are providing.



Comment 11 Brian Brock 2005-08-05 15:12:30 UTC
ugh, mistake on my part.  should *not* have been cloned.

Comment 12 Brian Brock 2005-08-05 15:14:01 UTC
*** Bug 165217 has been marked as a duplicate of this bug. ***

Comment 13 Red Hat Bugzilla 2005-10-05 13:39:22 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-356.html



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