diff options
author | Ron Yorston <rmy@pobox.com> | 2022-12-22 11:38:39 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-12-22 11:38:39 +0000 |
commit | 67aec6403c80b8956b8b0f78f58e2b9664bd4f62 (patch) | |
tree | 533c9ee833b166a5db032413f5e58cd784287ae9 | |
parent | b11352dcbdd94e23224057056594ddc165883c19 (diff) | |
download | busybox-w32-67aec6403c80b8956b8b0f78f58e2b9664bd4f62.tar.gz busybox-w32-67aec6403c80b8956b8b0f78f58e2b9664bd4f62.tar.bz2 busybox-w32-67aec6403c80b8956b8b0f78f58e2b9664bd4f62.zip |
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.
-rw-r--r-- | win32/dirent.c | 2 | ||||
-rw-r--r-- | win32/dirent.h | 2 |
2 files changed, 0 insertions, 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) | |||
11 | /* copy file name from WIN32_FIND_DATA to dirent */ | 11 | /* copy file name from WIN32_FIND_DATA to dirent */ |
12 | strcpy(ent->d_name, fdata->cFileName); | 12 | strcpy(ent->d_name, fdata->cFileName); |
13 | 13 | ||
14 | #if ENABLE_FEATURE_EXTRA_FILE_DATA | ||
15 | if ((fdata->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && | 14 | if ((fdata->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) && |
16 | (fdata->dwReserved0 == IO_REPARSE_TAG_SYMLINK || | 15 | (fdata->dwReserved0 == IO_REPARSE_TAG_SYMLINK || |
17 | fdata->dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) | 16 | fdata->dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT)) |
@@ -20,7 +19,6 @@ static inline void finddata2dirent(struct dirent *ent, WIN32_FIND_DATAA *fdata) | |||
20 | ent->d_type = DT_DIR; | 19 | ent->d_type = DT_DIR; |
21 | else | 20 | else |
22 | ent->d_type = DT_REG; | 21 | ent->d_type = DT_REG; |
23 | #endif | ||
24 | } | 22 | } |
25 | 23 | ||
26 | DIR *opendir(const char *name) | 24 | 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; | |||
9 | #define DT_LNK 3 | 9 | #define DT_LNK 3 |
10 | 10 | ||
11 | struct dirent { | 11 | struct dirent { |
12 | #if ENABLE_FEATURE_EXTRA_FILE_DATA | ||
13 | unsigned char d_type; | 12 | unsigned char d_type; |
14 | #endif | ||
15 | char d_name[PATH_MAX]; // file name | 13 | char d_name[PATH_MAX]; // file name |
16 | }; | 14 | }; |
17 | 15 | ||