SDL: Define relevant macros when LACKS_ERRNO_H is true

From 3195980b497edc3d9e78a572b48ec5cc5db45955 Mon Sep 17 00:00:00 2001
From: Thaddeus Crews <[EMAIL REDACTED]>
Date: Wed, 30 Jul 2025 10:34:01 -0500
Subject: [PATCH] Define relevant macros when LACKS_ERRNO_H is true

---
 src/stdlib/SDL_malloc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/stdlib/SDL_malloc.c b/src/stdlib/SDL_malloc.c
index 3fb08749b27dd..f9a7d0efbf5c9 100644
--- a/src/stdlib/SDL_malloc.c
+++ b/src/stdlib/SDL_malloc.c
@@ -1478,6 +1478,13 @@ DLMALLOC_EXPORT int mspace_mallopt(int, int);
 #endif /* NO_MALLOC_STATS */
 #ifndef LACKS_ERRNO_H
 #include <errno.h>       /* for MALLOC_FAILURE_ACTION */
+#else /* LACKS_ERRNO_H */
+#ifndef EINVAL
+#define EINVAL 22
+#endif
+#ifndef ENOMEM
+#define ENOMEM 12
+#endif
 #endif /* LACKS_ERRNO_H */
 #ifdef DEBUG
 #if ABORT_ON_ASSERT_FAILURE