Bug#353031: posix_fadvise defines missing
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.
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.
--
greg
Reply to: