ipc: Avoid 'unistd.h' error with MSVC
What changed, and why it matters
This commit fixes a Windows build problem. The code included a Unix-only header file ('unistd.h') unconditionally, which caused Microsoft Visual C++ (MSVC) compilation to fail because that header does not exist on Windows. The fix wraps the include so it is only used on non-Windows builds. There is no security issue here—just a portability fix to make the project compile on Windows.
No security action needed. Treat as a normal build-system portability fix.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change in src/ipc/interfaces.cpp moves ‘#include
Changed components
src/ipc/interfaces.cppInspect captured patch +4 / −1
diff --git a/src/ipc/interfaces.cpp b/src/ipc/interfaces.cpp
index 3345a921..71f1f4ee 100644
--- a/src/ipc/interfaces.cpp
+++ b/src/ipc/interfaces.cpp
@@ -21,10 +21,13 @@
#include <memory>
#include <stdexcept>
#include <string>
-#include <unistd.h>
#include <utility>
#include <vector>
+#ifndef WIN32
+#include <unistd.h>
+#endif
+
namespace ipc {
namespace {
#ifndef WIN32
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.