cvs: php4 /ext/standard dir.c
| From: | Stanislav Malyshev | Date: | Thu, 07 Sep 2000 17:55:54 +0000 |
| Subject: | cvs: php4 /ext/standard dir.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1623@lists.php.net to get a copy of this message | ||
stas Thu Sep 7 10:55:54 2000 EDT
Modified files:
/php4/ext/standard dir.c
Log:
Fix readdir bug in libc5
@Fix readdir bug in libc5
# If libc5 receives 0 in *result of readdir_r, it just returns error
# That's a clear bug, so this is a workaround.
Index: php4/ext/standard/dir.c
diff -u php4/ext/standard/dir.c:1.43 php4/ext/standard/dir.c:1.44
--- php4/ext/standard/dir.c:1.43 Fri Sep 1 05:06:52 2000
+++ php4/ext/standard/dir.c Thu Sep 7 10:55:53 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.43 2000/09/01 12:06:52 zeev Exp $ */
+/* $Id: dir.c,v 1.44 2000/09/07 17:55:53 stas Exp $ */
/* {{{ includes/startup/misc */
@@ -290,7 +290,7 @@
pval **id, **tmp, *myself;
php_dir *dirp;
char entry[sizeof(struct dirent)+MAXPATHLEN+1];
- struct dirent *result;
+ struct dirent *result = (struct dirent *)&entry; /* patch for libc5 readdir problems */
DIRLS_FETCH();
FETCH_DIRP();