From 6a44baad9b64249e2edb69dfbfc1798fae56b898 Mon Sep 17 00:00:00 2001 From: danprice142 Date: Thu, 5 Feb 2026 07:29:28 +0000 Subject: [PATCH] Fix DSU joystick build on Unix platforms Add missing sys/time.h for struct timeval and sys/select.h for select() function and fd_set types. These headers are required for socket operations on Unix-like platforms including Linux, BSD, and other POSIX systems. This resolves compilation errors: - 'storage size of tv isn't known' (struct timeval) - 'implicit declaration of function select' - 'fd_set' and related macros undeclared The headers are added to the standard Unix/Linux platform section after errno.h and before sys/ioctl.h to maintain proper ordering. --- src/joystick/dsu/SDL_dsujoystick.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/joystick/dsu/SDL_dsujoystick.c b/src/joystick/dsu/SDL_dsujoystick.c index 65e2354e17..f4779b75c5 100644 --- a/src/joystick/dsu/SDL_dsujoystick.c +++ b/src/joystick/dsu/SDL_dsujoystick.c @@ -88,6 +88,8 @@ typedef int socklen_t; #include #include #include + #include + #include #ifdef HAVE_SYS_IOCTL_H #include #endif