summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2023-06-26 11:18:31 +0100
committerSimon McVittie <smcv@debian.org>2023-06-29 10:55:32 +0100
commit406af0b294159d49c15dfe07d6ff08e3af68cb63 (patch)
treea3d546ca71a52f09b3a8d081cb8bd5aa4fe32a1d
parente7fd0b8e12c9b6429ca4cd278f908fc1903e7c04 (diff)
SDL_config.h: Assume that all platforms have ISO C89 stddef.h
sdl12-compat's SDL_stdinc.h includes `<stddef.h>` if `HAVE_STDDEF_H` is defined, but until now there was nothing that would have defined that macro. In classic SDL 1.2, SDL_stdinc.h historically included this, and some games (such as Debian package 'berusky') rely on it. stddef.h is required by ISO C89, and is unconditionally included in the headers of some widely portable libraries like libdbus, so it seems safe to assume that all platforms have it (including Windows) unless we hear otherwise. Resolves: https://github.com/libsdl-org/sdl12-compat/issues/297 Signed-off-by: Simon McVittie <smcv@debian.org> Forwarded: https://github.com/libsdl-org/sdl12-compat/pull/298 Applied-upstream: 1.2.66, commit:65641b54942f06c191b73726a9538763c5ead922 Bug-Debian: https://bugs.debian.org/1039439 Gbp-Pq: Name SDL_config.h-Assume-that-all-platforms-have-ISO-C89-stdde.patch
-rw-r--r--include/SDL/SDL_config.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/SDL/SDL_config.h b/include/SDL/SDL_config.h
index afd0480..f62c170 100644
--- a/include/SDL/SDL_config.h
+++ b/include/SDL/SDL_config.h
@@ -54,6 +54,8 @@ typedef unsigned __int64 uint64_t;
#include <stdarg.h>
#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+
/* for now, let's try and say everything that we care about that isn't Windows
has these C runtime functions available. We're trying to avoid a configure
stage, though. Send patches if your platform lacks something. */