patch fix to fix readdir_r calls
| From: | Jason Greene | Date: | Tue, 17 Oct 2000 23:28:47 +0000 |
| Subject: | patch fix to fix readdir_r calls | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-35330@lists.php.net to get a copy of this message | ||
Can someone commit these patches to cvs they modify ext/standard/dir.c and ext/session/mod_files.c?
-Jason
*** mod_files.c.orig Tue Oct 17 15:46:23 2000
--- mod_files.c Tue Oct 17 15:46:38 2000
***************
*** 150,156 ****
static int ps_files_cleanup_dir(const char *dirname, int maxlifetime)
{
DIR *dir;
! char dentry[sizeof(struct dirent) + MAXPATHLEN + 1];
struct dirent *entry = (struct dirent *) &dentry;
struct stat sbuf;
char buf[MAXPATHLEN];
--- 150,156 ----
static int ps_files_cleanup_dir(const char *dirname, int maxlifetime)
{
DIR *dir;
! char dentry[sizeof(struct dirent) + MAXPATHLEN];
struct dirent *entry = (struct dirent *) &dentry;
struct stat sbuf;
char buf[MAXPATHLEN];
*** dir.c.orig Tue Oct 17 15:42:55 2000
--- dir.c Tue Oct 17 16:07:51 2000
***************
*** 289,295 ****
{
pval **id, **tmp, *myself;
php_dir *dirp;
! char entry[sizeof(struct dirent)+MAXPATHLEN+1];
struct dirent *result = (struct dirent *)&entry; /* patch for libc5 readdir problems */
DIRLS_FETCH();
--- 289,295 ----
{
pval **id, **tmp, *myself;
php_dir *dirp;
! char entry[sizeof(struct dirent)+MAXPATHLEN];
struct dirent *result = (struct dirent *)&entry; /* patch for libc5 readdir problems */
DIRLS_FETCH();