According to the SUSv3, ftruncate(...) routine shall be visible when including unistd.h; but it is not when _POSIX_C_SOURCE only is defined (no XSI features). Sample code: ---------------- #define _POSIX_C_SOURCE 200112L #include <unistd.h> #include <sys/types.h> typedef int (*ftruncate_test)(int fildes, off_t length); int dummyfcn (void) { ftruncate_test dummyvar; dummyvar = ftruncate; return 0; }
Fixed. But this has nothing to do with nptl, chose the component correctly.
Subject: Bug 640 CVSROOT: /cvs/glibc Module name: libc Branch: glibc-2_3-branch Changes by: roland@sources.redhat.com 2005-02-16 10:09:07 Modified files: posix : unistd.h Log message: 2005-01-06 Ulrich Drepper <drepper@redhat.com> * posix/unistd.h: Declare ftruncate for POSIX 2003. [BZ #640] Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/posix/unistd.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.130&r2=1.130.4.1