Skip to content

Commit a03a885

Browse files
committed
fixup
1 parent 2377def commit a03a885

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/tools.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
#include <process.h>
1515
#include <sys/types.h>
1616
#include <sys/stat.h>
17+
18+
#if !defined(S_ISDIR) && defined(S_IFMT) && defined(S_IFDIR)
19+
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
20+
#endif
1721
#else
1822
#include <unistd.h>
1923
#include <sys/stat.h>
@@ -22,7 +26,7 @@
2226
static bool is_dir(const char *dir)
2327
{
2428
struct stat sb;
25-
if (stat(dir, &sb) == 0 && S_ISDIR(sb.st_mode))// & S_IFMT) == S_IFDIR)
29+
if (stat(dir, &sb) == 0 && S_ISDIR(sb.st_mode))
2630
return true;
2731
return false;
2832
}

0 commit comments

Comments
 (0)