From eed266d26628816da22e640b20a45d7198230284 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 30 Mar 2023 00:37:36 +0200
Subject: [PATCH] SDL_syshaptic.c and SDL_sysjoystick.c need string.h for
strerror
---
src/haptic/linux/SDL_syshaptic.c | 3 ++-
src/joystick/linux/SDL_sysjoystick.c | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/haptic/linux/SDL_syshaptic.c b/src/haptic/linux/SDL_syshaptic.c
index 5aa16cd63e73..403e749d713d 100644
--- a/src/haptic/linux/SDL_syshaptic.c
+++ b/src/haptic/linux/SDL_syshaptic.c
@@ -32,7 +32,8 @@
#include <linux/input.h> /* Force feedback linux stuff. */
#include <fcntl.h> /* O_RDWR */
#include <limits.h> /* INT_MAX */
-#include <errno.h> /* errno, strerror */
+#include <errno.h> /* errno */
+#include <string.h> /* strerror */
#include <sys/stat.h> /* stat */
#define MAX_HAPTICS 32 /* It's doubtful someone has more then 32 evdev */
diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index 897ae3f0f2cf..dd510d159dfd 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -34,6 +34,7 @@
#include <limits.h> /* For the definition of PATH_MAX */
#ifdef HAVE_INOTIFY
#include <sys/inotify.h>
+#include <string.h> /* strerror */
#endif
#include <sys/ioctl.h>
#include <unistd.h>