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

Bug#353031: posix_fadvise defines missing



Package: libc6
Version: 2.3.6-1
Severity: normal


>From the man page:

----------------------------------------------------------------
NAME
       posix_fadvise - predeclare an access pattern for file data
SYNOPSIS
       #include <fcntl.h>
       int posix_fadvise(int fd, off_t offset, off_t len, int advice);
----------------------------------------------------------------


My test program:

----------------------------------------------------------------
#include <fcntl.h>
int main (int argc, char *argv[], char* envp[]) 
{
  posix_fadvise(0, 0, 0, POSIX_FADV_NORMAL);
}
----------------------------------------------------------------


The result:

----------------------------------------------------------------
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").


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-rc4
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

-- no debconf information



Reply to: