Index: unix/tclUnixThrd.c
===================================================================
RCS file: /home/xtifr/cvs/debian/tcl8.4/unix/tclUnixThrd.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 tclUnixThrd.c
--- unix/tclUnixThrd.c	6 Aug 2002 17:46:59 -0000	1.1.1.1
+++ unix/tclUnixThrd.c	17 Dec 2002 01:39:55 -0000
@@ -25,7 +25,9 @@
     struct tm   	ltbuf;
     struct {
 	Tcl_DirEntry ent;
-	char name[PATH_MAX+1];
+#ifdef NAME_MAX	 /* if not, dirent *better* have room for name */
+	char name[NAME_MAX+1];
+#endif
     } rdbuf;
 } ThreadSpecificData;
 
@@ -819,7 +821,7 @@
 #   endif /* HAVE_STRUCT_DIRENT64 */
     if (ent != NULL) {
 	memcpy((VOID *) &tsdPtr->rdbuf.ent, (VOID *) ent,
-		sizeof(Tcl_DirEntry) + sizeof(char) * (PATH_MAX+1));
+		sizeof(&tsdPtr->rdbuf));
 	ent = &tsdPtr->rdbuf.ent;
     }
     Tcl_MutexUnlock(&rdMutex);
