This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: getdents64 problem


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   `------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]