sdl12-compat: BSD support: Don't assume alloca.h is available on Unix

From 3f496287f50f3ca14916cc6e0ab6f3b2a4548366 Mon Sep 17 00:00:00 2001
From: nia <[EMAIL REDACTED]>
Date: Fri, 1 Apr 2022 09:10:45 +0200
Subject: [PATCH] BSD support: Don't assume alloca.h is available on Unix

BSDs have alloca() defined in stdlib.h. It's in alloca.h on
Linux and illumos.

Signed-off-by: Nia Alarie <nia@NetBSD.org>
---
 include/SDL/SDL_config.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/SDL/SDL_config.h b/include/SDL/SDL_config.h
index dac480d..7b832a0 100644
--- a/include/SDL/SDL_config.h
+++ b/include/SDL/SDL_config.h
@@ -59,7 +59,6 @@ has these C runtime functions available. We're trying to avoid a configure
 stage, though. Send patches if your platform lacks something. */
 #ifndef _WIN32
 #define HAVE_LIBC 1
-#define HAVE_ALLOCA_H 1
 #define HAVE_SYS_TYPES_H 1
 #define HAVE_STDIO_H 1
 #define STDC_HEADERS 1
@@ -72,6 +71,10 @@ stage, though. Send patches if your platform lacks something. */
 #define HAVE_MATH_H 1
 #endif
 
+#if defined(__linux__) || defined(__sun)
+#define HAVE_ALLOCA_H 1
+#endif
+
 #if defined(__unix__) || defined(__APPLE__)
 #define HAVE_ICONV_H 1
 #define HAVE_SIGNAL_H 1