SDL_image: cmake, tests: require c99

From 9c29d1ea27c5599687d0069bed0d4eaac3992aed Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sun, 30 Nov 2025 23:03:02 +0300
Subject: [PATCH] cmake, tests: require c99

---
 test/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a28ca137..4c389283 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -41,6 +41,9 @@ function(add_sdl_image_test_executable TARGET)
             $<TARGET_PROPERTY:${sdl3_image_target_name},COMPILE_DEFINITIONS>
     )
     sdl_add_warning_options(${TARGET} WARNING_AS_ERROR ${SDLIMAGE_WERROR})
+    if("c_std_99" IN_LIST CMAKE_C_COMPILE_FEATURES)
+        target_compile_features(${TARGET} PRIVATE c_std_99)
+    endif()
     target_link_libraries(${TARGET} PRIVATE SDL3_image::SDL3_image SDL3::SDL3_test SDL3::SDL3)
 
     if(SDLIMAGE_TESTS_INSTALL)