Skip to content

Commit b0601e6

Browse files
kbleesgitster
authored andcommitted
Win32 dirent: remove unused dirent.d_reclen member
Remove the union around dirent.d_type and the unused dirent.d_reclen member (which was necessary for compatibility with the MinGW dirent runtime, which is no longer used). Signed-off-by: Karsten Blees <[email protected]> Signed-off-by: Erik Faye-Lund <[email protected]> Signed-off-by: Stepan Kasal <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1d94c40 commit b0601e6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

compat/win32/dirent.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ typedef struct DIR DIR;
1010

1111
struct dirent {
1212
char d_name[FILENAME_MAX]; /* File name. */
13-
union {
14-
unsigned short d_reclen; /* Always zero. */
15-
unsigned char d_type; /* Reimplementation adds this */
16-
};
13+
unsigned char d_type; /* file type to prevent lstat after readdir */
1714
};
1815

1916
DIR *opendir(const char *dirname);

0 commit comments

Comments
 (0)