mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
(__GETDENTS): Use __lseek64 instead of __lseek.
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
|
/* Copyright (C) 1993,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -98,7 +98,7 @@ internal_function
|
|||||||
__GETDENTS (int fd, char *buf, size_t nbytes)
|
__GETDENTS (int fd, char *buf, size_t nbytes)
|
||||||
{
|
{
|
||||||
DIRENT_TYPE *dp;
|
DIRENT_TYPE *dp;
|
||||||
off_t last_offset = -1;
|
off64_t last_offset = -1;
|
||||||
ssize_t retval;
|
ssize_t retval;
|
||||||
|
|
||||||
#ifdef __NR_getdents64
|
#ifdef __NR_getdents64
|
||||||
@ -164,7 +164,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
|
|||||||
otherwise signal overflow. */
|
otherwise signal overflow. */
|
||||||
if (last_offset != -1)
|
if (last_offset != -1)
|
||||||
{
|
{
|
||||||
__lseek (fd, last_offset, SEEK_SET);
|
__lseek64 (fd, last_offset, SEEK_SET);
|
||||||
return (char *) dp - buf;
|
return (char *) dp - buf;
|
||||||
}
|
}
|
||||||
__set_errno (EOVERFLOW);
|
__set_errno (EOVERFLOW);
|
||||||
@ -222,7 +222,7 @@ __GETDENTS (int fd, char *buf, size_t nbytes)
|
|||||||
/* Our heuristic failed. We read too many entries. Reset
|
/* Our heuristic failed. We read too many entries. Reset
|
||||||
the stream. */
|
the stream. */
|
||||||
assert (last_offset != -1);
|
assert (last_offset != -1);
|
||||||
__lseek (fd, last_offset, SEEK_SET);
|
__lseek64 (fd, last_offset, SEEK_SET);
|
||||||
|
|
||||||
if ((char *) dp == buf)
|
if ((char *) dp == buf)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user