SDL: alloca: use alloca from <stdlib.h> on NetBSD

From d6291d4d4209c974751110afdcb040896d791b4f Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 22 Nov 2023 03:27:24 +0100
Subject: [PATCH] alloca: use alloca from <stdlib.h> on NetBSD

The only generally portable way to do this is to use -std=gnu99,
"#include <stdlib.h>", and write "alloca".
__builtin_alloca does not seem to be available on NetBSD
---
 include/SDL3/SDL_stdinc.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h
index 520c7561a6fc..50d81825c4ef 100644
--- a/include/SDL3/SDL_stdinc.h
+++ b/include/SDL3/SDL_stdinc.h
@@ -41,6 +41,12 @@
 # ifndef alloca
 #  ifdef HAVE_ALLOCA_H
 #   include <alloca.h>
+#  elif defined(__NETBSD__)
+#   if defined(__STRICT_ANSI__)
+#    define SDL_DISABLE_ALLOCA
+#   else
+#    include <stdlib.h>
+#   endif
 #  elif defined(__GNUC__)
 #   define alloca __builtin_alloca
 #  elif defined(_MSC_VER)