getdents64 problem
Ulrich Drepper
drepper@redhat.com
Mon Jan 22 13:44:00 GMT 2001
Please give this patch a try:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: getdents.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/getdents.c,v
retrieving revision 1.15
diff -u -d -u -p -r1.15 getdents.c
--- getdents.c 2000/11/30 17:41:56 1.15
+++ getdents.c 2001/01/22 21:43:23
@@ -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.
The GNU C Library is free software; you can redistribute it and/or
@@ -157,7 +157,7 @@ __GETDENTS (int fd, char *buf, size_t nb
if ((sizeof (dp->d_ino) != sizeof (kdp->d_ino)
&& dp->d_ino != d_ino)
|| (sizeof (dp->d_off) != sizeof (kdp->d_off)
- && dp->d_off != d_off))
+ && (uint32_t) dp->d_off != (uint64_t) d_off))
{
/* Overflow. If there was at least one entry
before this one, return them without error,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-alpha
mailing list