Bug#353031: posix_fadvise defines missing
On Thu, Feb 16, 2006 at 12:24:27AM -0500, Greg Stark wrote:
>
> Daniel Jacobowitz <dan@debian.org> writes:
>
> > > This seems to be a problem related to the "features.h" stuff. If I define
> > > _POSIX_C_SOURCE to 200112L then it works but then random other system functions
> > > aren't defined. (specifically "random" and "srandom").
> >
> > Try -D_GNU_SOURCE then? Or -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE, or
> > several other combinations.
>
> As I mentioned I tried _POSIX_C_SOURCE=200112L and it caused posix_fadvise to
> work but made random and srandom stop working. I did finally get it working
> with _GNU_SOURCE.
Yes, did you read my suggestion? The default with none of the features
specified includes the BSD functions; but if you explicitly request
_POSIX_C_SOURCE, then you don't get BSD by default.
> If this is intentional (which seems unlikely, why should I have to define
> these things just to get a standard libc function?) then it's at the very
> least a documentation bug. The man page clearly indicates that only "#include
> <fcntl.h>" is required.
The man pages come from manpages-dev.
--
Daniel Jacobowitz
CodeSourcery
Reply to: