aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/chunk_file.h7
-rw-r--r--src/common/file_util.cpp11
-rw-r--r--src/common/file_util.h3
3 files changed, 14 insertions, 7 deletions
diff --git a/src/common/chunk_file.h b/src/common/chunk_file.h
index dcd80525..ee9f3d7c 100644
--- a/src/common/chunk_file.h
+++ b/src/common/chunk_file.h
@@ -26,13 +26,14 @@
// - Zero backwards/forwards compatibility
// - Serialization code for anything complex has to be manually written.
-#include <map>
-#include <vector>
+#include <cstring>
#include <deque>
-#include <string>
#include <list>
+#include <map>
#include <set>
+#include <string>
#include <type_traits>
+#include <vector>
#include "common/common_types.h"
#include "common/file_util.h"
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 24648ea3..836b58d5 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -17,6 +17,8 @@
#include <direct.h> // getcwd
#include <tchar.h>
+ #include "common/string_util.h"
+
// 64 bit offsets for windows
#define fseeko _fseeki64
#define ftello _ftelli64
@@ -25,8 +27,13 @@
#define fstat64 _fstat64
#define fileno _fileno
#else
- #include <sys/param.h>
- #include <sys/types.h>
+ #ifdef __APPLE__
+ #include <sys/param.h>
+ #endif
+ #include <cctype>
+ #include <cerrno>
+ #include <cstdlib>
+ #include <cstring>
#include <dirent.h>
#include <pwd.h>
#include <unistd.h>
diff --git a/src/common/file_util.h b/src/common/file_util.h
index b6582929..8fe772ae 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -6,13 +6,12 @@
#include <array>
#include <fstream>
+#include <cstddef>
#include <cstdio>
-#include <cstring>
#include <string>
#include <vector>
#include "common/common_types.h"
-#include "common/string_util.h"
// User directory indices for GetUserPath
enum {