diff --git a/CMakeLists.txt b/CMakeLists.txt index 7dba1ad3b4..6bf827978f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1377,7 +1377,7 @@ if(SDL_JOYSTICK) endif() # DSU (DualShock UDP) client support - if(SDL_DSU_JOYSTICK AND NOT EMSCRIPTEN) + if(SDL_DSU_JOYSTICK AND NOT EMSCRIPTEN AND (WINDOWS OR LINUX OR ANDROID OR HAIKU OR FREEBSD OR NETBSD OR OPENBSD OR MACOS)) set(SDL_JOYSTICK_DSU 1) sdl_glob_sources( "${SDL3_SOURCE_DIR}/src/joystick/dsu/*.c" diff --git a/src/joystick/dsu/SDL_dsujoystick.c b/src/joystick/dsu/SDL_dsujoystick.c index 977904e6c9..ecd6ead78b 100644 --- a/src/joystick/dsu/SDL_dsujoystick.c +++ b/src/joystick/dsu/SDL_dsujoystick.c @@ -61,7 +61,9 @@ typedef int socklen_t; #include #include #include - #include + #ifdef HAVE_SYS_IOCTL_H + #include + #endif #ifdef __sun #include #endif diff --git a/src/joystick/dsu/SDL_dsujoystick_driver.c b/src/joystick/dsu/SDL_dsujoystick_driver.c index 9573fdb567..147e0a71b1 100644 --- a/src/joystick/dsu/SDL_dsujoystick_driver.c +++ b/src/joystick/dsu/SDL_dsujoystick_driver.c @@ -64,12 +64,6 @@ extern SDL_JoystickDriver SDL_DSU_JoystickDriver; /* Global DSU context pointer */ struct DSU_Context_t *s_dsu_ctx = NULL; -/* Helper function to work around macro issues */ -static SDL_INLINE SDL_Mutex* GetDSUMutex(void) { - struct DSU_Context_t *ctx = s_dsu_ctx; - return ctx ? ctx->slots_mutex : NULL; -} - /* Forward declarations */ extern int SDLCALL DSU_ReceiverThread(void *data); extern void DSU_RequestControllerInfo(struct DSU_Context_t *ctx, Uint8 slot);