From b81d4170f9b89b5cc03e33ce82d6caee40fa11ea Mon Sep 17 00:00:00 2001 From: cold-brewed Date: Tue, 18 Oct 2022 14:20:33 -0400 Subject: [PATCH] viso: Check for directory without S_ISDIR macro for msvc --- src/cdrom/cdrom_image_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdrom/cdrom_image_backend.c b/src/cdrom/cdrom_image_backend.c index 44c9efa7a..2ec7a5d03 100644 --- a/src/cdrom/cdrom_image_backend.c +++ b/src/cdrom/cdrom_image_backend.c @@ -148,7 +148,7 @@ bin_init(const char *filename, int *error) /* Use a blank structure if stat failed. */ memset(&stats, 0, sizeof(struct stat)); } - *error = ((tf->file == NULL) || (S_ISDIR(stats.st_mode))); + *error = ((tf->file == NULL) || ((stats.st_mode & S_IFMT) == S_IFDIR)); /* Set the function pointers. */ if (!*error) {