summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/build_engine/target_map/target_map.cpp4
-rw-r--r--src/buildtool/execution_api/execution_service/server_implementation.cpp4
-rw-r--r--src/buildtool/file_system/file_system_manager.hpp2
-rw-r--r--src/buildtool/logging/log_sink_file.hpp2
-rw-r--r--src/buildtool/main/archive.cpp4
-rw-r--r--src/buildtool/serve_api/serve_service/serve_server_implementation.cpp4
-rw-r--r--src/buildtool/system/system.cpp4
-rw-r--r--src/buildtool/system/system_command.hpp4
-rw-r--r--src/other_tools/just_mr/main.cpp4
-rw-r--r--src/utils/cpp/file_locking.cpp4
10 files changed, 34 insertions, 2 deletions
diff --git a/src/buildtool/build_engine/target_map/target_map.cpp b/src/buildtool/build_engine/target_map/target_map.cpp
index 24f5945c..9d9e7d3c 100644
--- a/src/buildtool/build_engine/target_map/target_map.cpp
+++ b/src/buildtool/build_engine/target_map/target_map.cpp
@@ -23,7 +23,11 @@
#include <unordered_set>
#include <utility>
+#ifdef __unix__
#include <fnmatch.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
#include "fmt/core.h"
#include "src/buildtool/build_engine/base_maps/field_reader.hpp"
diff --git a/src/buildtool/execution_api/execution_service/server_implementation.cpp b/src/buildtool/execution_api/execution_service/server_implementation.cpp
index 3ab12696..57a03133 100644
--- a/src/buildtool/execution_api/execution_service/server_implementation.cpp
+++ b/src/buildtool/execution_api/execution_service/server_implementation.cpp
@@ -17,7 +17,11 @@
#include <iostream>
#include <memory>
+#ifdef __unix__
#include <sys/types.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
#include "fmt/core.h"
#include "grpcpp/grpcpp.h"
diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp
index 6f32458e..80b066c5 100644
--- a/src/buildtool/file_system/file_system_manager.hpp
+++ b/src/buildtool/file_system/file_system_manager.hpp
@@ -26,8 +26,6 @@
#include <optional>
#include <unordered_set>
-#include <fcntl.h>
-
#ifdef __unix__
#include <fcntl.h>
#include <sys/stat.h>
diff --git a/src/buildtool/logging/log_sink_file.hpp b/src/buildtool/logging/log_sink_file.hpp
index c658af7a..f99ce769 100644
--- a/src/buildtool/logging/log_sink_file.hpp
+++ b/src/buildtool/logging/log_sink_file.hpp
@@ -28,6 +28,8 @@
#ifdef __unix__
#include <sys/time.h>
+#else
+#error "Non-unix is not supported yet"
#endif
#include "fmt/chrono.h"
diff --git a/src/buildtool/main/archive.cpp b/src/buildtool/main/archive.cpp
index 2f6fc099..997857b4 100644
--- a/src/buildtool/main/archive.cpp
+++ b/src/buildtool/main/archive.cpp
@@ -16,7 +16,11 @@
#include "src/buildtool/main/archive.hpp"
+#ifdef __unix__
#include <unistd.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
#include "src/buildtool/file_system/git_repo.hpp"
#include "src/buildtool/logging/log_level.hpp"
diff --git a/src/buildtool/serve_api/serve_service/serve_server_implementation.cpp b/src/buildtool/serve_api/serve_service/serve_server_implementation.cpp
index 01be64af..59470966 100644
--- a/src/buildtool/serve_api/serve_service/serve_server_implementation.cpp
+++ b/src/buildtool/serve_api/serve_service/serve_server_implementation.cpp
@@ -17,7 +17,11 @@
#include <iostream>
#include <memory>
+#ifdef __unix__
#include <sys/types.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
#include "fmt/core.h"
#include "grpcpp/grpcpp.h"
diff --git a/src/buildtool/system/system.cpp b/src/buildtool/system/system.cpp
index c84f34cf..228c7806 100644
--- a/src/buildtool/system/system.cpp
+++ b/src/buildtool/system/system.cpp
@@ -18,7 +18,11 @@
#include <cstdlib>
#include <string>
+#ifdef __unix__
#include <unistd.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
void System::ExitWithoutCleanup(int exit_code) {
#ifdef VALGRIND_BUILD
diff --git a/src/buildtool/system/system_command.hpp b/src/buildtool/system/system_command.hpp
index 7f16fc99..24931dc7 100644
--- a/src/buildtool/system/system_command.hpp
+++ b/src/buildtool/system/system_command.hpp
@@ -27,8 +27,12 @@
#include <utility> // std::move
#include <vector>
+#ifdef __unix__
#include <sys/wait.h>
#include <unistd.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
#include "gsl/gsl"
#include "src/buildtool/file_system/file_system_manager.hpp"
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp
index 5dc6cc0f..e0504ea7 100644
--- a/src/other_tools/just_mr/main.cpp
+++ b/src/other_tools/just_mr/main.cpp
@@ -16,7 +16,11 @@
#include <filesystem>
#include <utility>
+#ifdef __unix__
#include <unistd.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
#include "CLI/CLI.hpp"
#include "gsl/gsl"
diff --git a/src/utils/cpp/file_locking.cpp b/src/utils/cpp/file_locking.cpp
index f4b6eb2c..2757dc04 100644
--- a/src/utils/cpp/file_locking.cpp
+++ b/src/utils/cpp/file_locking.cpp
@@ -14,7 +14,11 @@
#include "src/utils/cpp/file_locking.hpp"
+#ifdef __unix__
#include <sys/file.h>
+#else
+#error "Non-unix is not supported yet"
+#endif
#include "src/buildtool/file_system/file_system_manager.hpp"
#include "src/buildtool/logging/log_level.hpp"