From 67aec6403c80b8956b8b0f78f58e2b9664bd4f62 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Thu, 22 Dec 2022 11:38:39 +0000 Subject: win32: always allow d_type member of struct dirent The d_type member of struct dirent is required by the implementation of glob(3). As a result it isn't possible to build the make applet unless FEATURE_EXTRA_FILE_DATA is configured. Allow d_type unconditionally. --- win32/dirent.c | 2 -- win32/dirent.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/win32/dirent.c b/win32/dirent.c index b5b379209..d708de691 100644 --- a/win32/dirent.c +++ b/win32/dirent.c @@ -11,7 +11,6 @@ static inline void finddata2dirent(struct dirent *ent, WIN32_FIND_DATAA *fdata) /* copy file name from WIN32_FIND_DATA to dirent */ strcpy(ent->d_name, fdata->cFileName); -#if ENABLE_FEATURE_EXTRA_FILE_DATA if ((fdata->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && (fdata->dwReserved0 == IO_REPARSE_TAG_SYMLINK || fdata->dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) @@ -20,7 +19,6 @@ static inline void finddata2dirent(struct dirent *ent, WIN32_FIND_DATAA *fdata) ent->d_type = DT_DIR; else ent->d_type = DT_REG; -#endif } DIR *opendir(const char *name) diff --git a/win32/dirent.h b/win32/dirent.h index 214f80547..4e7971ef6 100644 --- a/win32/dirent.h +++ b/win32/dirent.h @@ -9,9 +9,7 @@ typedef struct DIR DIR; #define DT_LNK 3 struct dirent { -#if ENABLE_FEATURE_EXTRA_FILE_DATA unsigned char d_type; -#endif char d_name[PATH_MAX]; // file name }; -- cgit v1.2.3-55-g6feb