This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected
- From: "sourceware dot org at jan-o-sch dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 27 Mar 2013 14:28:10 +0000
- Subject: [Bug libc/15312] New: SEEK_HOLE and SEEK_DATA not exported as expected
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15312
Bug #: 15312
Summary: SEEK_HOLE and SEEK_DATA not exported as expected
Product: glibc
Version: 2.17
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: unassigned@sourceware.org
ReportedBy: sourceware.org@jan-o-sch.net
CC: drepper.fsp@gmail.com
Classification: Unclassified
The man pages for lseek(2) state one should include <sys/types.h> and
<unistd.h>. Doing so does not export SEEK_HOLE and SEEK_DATA.
Freshly built from git version 2.17.90, top commit
28831a9a671b109e49d0a4ddce00a08d734bfc97.
The following dummy source should build but doesn't:
--
#include <sys/types.h>
#include <unistd.h>
void
main(void)
{
lseek(0, 0, SEEK_DATA);
lseek(0, 0, SEEK_HOLE);
}
--
Errors:
/tmp/test.c: In function 'main':
/tmp/test.c:7: error: 'SEEK_DATA' undeclared (first use in this function)
/tmp/test.c:7: error: (Each undeclared identifier is reported only once
/tmp/test.c:7: error: for each function it appears in.)
/tmp/test.c:8: error: 'SEEK_HOLE' undeclared (first use in this function)
Including <linux/fs.h> is a work-around, but that should really be included
internally.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.