Skip to content

Commit 88c12f1

Browse files
committed
fix(diagnostics): include <poll.h> only on POSIX targets
Process.cpp included <poll.h> unconditionally, above the !defined(_WIN32) block every other POSIX header already lives in. poll() is used only on the POSIX path, but the include alone made the file -- and with it sharp_runtime_diagnostics -- fail to compile for every Windows target: CNA's MinGW cross-build (CNA_PLATFORM=WIN32) stopped at "fatal error: poll.h: No such file or directory", and MSVC has no such header either. The include moves into the POSIX block. Found by CNA's native-platform validation (libcna/cna plans/plan_native_platform_validation.md NPV-0027); with it the WIN32, CNA_ENABLE_SDL=OFF, DIRECTX11;DIRECTX12;SOFTWARE;HEADLESS cross-build of cna_demo_2d.exe completes.
1 parent 0c82d9b commit 88c12f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

modules/diagnostics/src/System/Diagnostics/Process.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "System/Diagnostics/Process.hpp"
55
#include <atomic>
66
#include <mutex>
7-
#include <poll.h>
87
#include "System/ArgumentException.hpp"
98
#include "System/ArgumentOutOfRangeException.hpp"
109
#include "System/InvalidOperationException.hpp"
@@ -16,6 +15,7 @@
1615
#include <sstream>
1716

1817
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__)
18+
# include <poll.h>
1919
# include <sys/wait.h>
2020
# include <sys/types.h>
2121
# include <unistd.h>

0 commit comments

Comments
 (0)