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

Bug#353031: posix_fadvise defines missing



On Wed, Feb 15, 2006 at 01:41:07PM -0500, Gregory Stark wrote:
> ----------------------------------------------------------------
> bash-3.00$ gcc -Wall pfa.c
> pfa.c: In function 'main':
> pfa.c:4: warning: implicit declaration of function 'posix_fadvise'
> pfa.c:4: error: 'POSIX_FADV_NORMAL' undeclared (first use in this function)
> pfa.c:4: error: (Each undeclared identifier is reported only once
> pfa.c:4: error: for each function it appears in.)
> pfa.c:5: warning: control reaches end of non-void function
> ----------------------------------------------------------------
> 
> 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.

-- 
Daniel Jacobowitz
CodeSourcery



Reply to: