From c011fa0188ec824a24dc35f0eb888d305d89e1d8 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 12 Aug 2024 15:25:57 +0300 Subject: [PATCH] Include unistd.h for getpid() when _IRR_COMPILE_WITH_X11_ --- irr/src/CIrrDeviceLinux.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irr/src/CIrrDeviceLinux.cpp b/irr/src/CIrrDeviceLinux.cpp index 71eb0f260..5491d2037 100644 --- a/irr/src/CIrrDeviceLinux.cpp +++ b/irr/src/CIrrDeviceLinux.cpp @@ -45,9 +45,12 @@ #include #endif +#if defined(_IRR_COMPILE_WITH_X11_) || defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_) +#include +#endif + #if defined _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ #include -#include #ifdef __FreeBSD__ #include