Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!think!samsung!cs.utexas.edu!hellgate.utah.edu!helios.ee.lbl.gov!ucsd!sdcc6!sdcc13!pa1285 From: pa1285@sdcc13.ucsd.edu (David L. Brown) Newsgroups: comp.os.minix Subject: Patches to fix opendir(3) Keywords: opendir getdents Message-ID: <5899@sdcc6.ucsd.edu> Date: 4 Jan 90 16:46:57 GMT Sender: news@sdcc6.ucsd.edu Reply-To: dbrown@ucsd.edu Lines: 32 I have received enough response to post the patches to make opendir work. Two #define's need to be changed in lib/other/getdents.c. These changes could probably also be made in a header file. David Brown dbrown@ucsd.edu --- Cut here --- *** old/getdents.c Mon Jan 1 19:57:14 1990 --- getdents.c Mon Jan 1 19:59:07 1990 *************** *** 95,102 **** ! #ifndef DIRENTSIZ ! #define DIRENTSIZ(x) (x) ! #endif ! #ifndef DIRENTBASESIZ ! #define DIRENTBASESIZ 0 ! #endif #ifndef DIRBLKSIZ --- 95,105 ---- ! #ifndef DIRENTSIZ ! #define DIRENTSIZ( namlen ) ((DIRENTBASESIZ + sizeof(long) + (namlen)) \ ! / sizeof(long) * sizeof(long)) ! #endif ! #ifndef DIRENTBASESIZ ! #define DIRENTBASESIZ (((struct dirent *)0)->d_name \ ! - (char *)&((struct dirent *)0)->d_ino) ! #endif ! #ifndef DIRBLKSIZ