summaryrefslogtreecommitdiff
path: root/zen/file_traverser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zen/file_traverser.cpp')
-rw-r--r--zen/file_traverser.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/zen/file_traverser.cpp b/zen/file_traverser.cpp
index 9a02eb1e..b39f8416 100644
--- a/zen/file_traverser.cpp
+++ b/zen/file_traverser.cpp
@@ -17,7 +17,7 @@
#include "dll.h"
#include "FindFilePlus/find_file_plus.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <sys/stat.h>
#include <dirent.h>
#endif
@@ -498,8 +498,7 @@ private:
const DWORD volumeSerial; //may be 0!
};
-
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
class DirTraverser
{
public:
@@ -515,7 +514,7 @@ public:
the buffer whose address is passed in entry as follows:
len = offsetof(struct dirent, d_name) + pathconf(dirpath, _PC_NAME_MAX) + 1
entryp = malloc(len); */
- const long maxPath = std::max<long>(::pathconf(directoryFormatted.c_str(), _PC_NAME_MAX), 10000); //::pathconf may return -1
+ const size_t maxPath = std::max<long>(::pathconf(directoryFormatted.c_str(), _PC_NAME_MAX), 10000); //::pathconf may return long(-1)
buffer.resize(offsetof(struct ::dirent, d_name) + maxPath + 1);
traverse(directoryFormatted, sink, 0);
bgstack15