From a4b71815026629e26d59e84f832deb27ff152d13 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Thu, 5 May 2022 13:44:45 +0100
Subject: [PATCH] qoi: Be compatible with older SDL versions
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
IMG_qoi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/IMG_qoi.c b/IMG_qoi.c
index 1ac4e6c..fbefe6c 100644
--- a/IMG_qoi.c
+++ b/IMG_qoi.c
@@ -28,6 +28,11 @@
#ifdef LOAD_QOI
+/* SDL < 2.0.12 compatibility */
+#ifndef SDL_zeroa
+#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
+#endif
+
#define QOI_MALLOC(sz) SDL_malloc(sz)
#define QOI_FREE(p) SDL_free(p)
#define QOI_ZEROARR(a) SDL_zeroa(a)