[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: warning: implicit declaration of function 'readahead'



On 2008-02-27 16:24 +0100, Mathieu Malaterre wrote:

> Hello,
>
>   I am getting this annoying warning:
>
> warning: implicit declaration of function 'readahead'
>
>   Looking at the man page of readahead I need to include fcntl.h to
> get the declaration. But after digging in the source the readahead is
> only accessible if __USE_GNU is defined, which in turn is only defined
> if _GNU_SOURCE is defined.
>
>   So either the declaration needs to be moved out of the __USE_GNU, or
> the documentation needs to be updated to specify the requirement for
> _GNU_SOURCE before the #include, correct ?

Well, the current version of the readahead manpage in sid already states
this:

,----
| SYNOPSIS
| 	#define _GNU_SOURCE
| 	#include <fcntl.h>
| 
| 	ssize_t readahead(int fd, off64_t offset, size_t count);
`----

My version of manpages-dev is 2.78-1, maybe your version is outdated?

Sven


Reply to: