From af633cdf77292a1e831871f54bd6ec26453dc4c0 Mon Sep 17 00:00:00 2001 From: jsteube Date: Wed, 16 Nov 2016 13:50:42 +0100 Subject: [PATCH] Replaced all calls to readdir() with readdir_r() to ensure thread safety with exception to windows, because there's no readdir_r() for windows. We should replace this with FindFirstFile() and FindNextFile() in a later version --- src/folder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/folder.c b/src/folder.c index cb49258f9..1b2bee377 100644 --- a/src/folder.c +++ b/src/folder.c @@ -125,7 +125,7 @@ char *first_file_in_directory (const char *path) { char *first_file = NULL; - #if defined (__APPLE__) + #if defined (_POSIX) struct dirent e; @@ -188,7 +188,7 @@ char **scan_directory (hashcat_ctx_t *hashcat_ctx, const char *path) if ((d = opendir (tmp_path)) != NULL) { - #if defined (__APPLE__) + #if defined (_POSIX) struct dirent e;