xref: /OK3568_Linux_fs/buildroot/package/hiredis/0003-Explicitly-set-c99-in-CMake.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 13a35bdb64615e381c5e1151cdd4e78bba71a6db Mon Sep 17 00:00:00 2001
2From: michael-grunder <michael.grunder@gmail.com>
3Date: Fri, 28 Aug 2020 12:35:01 -0700
4Subject: [PATCH] Explicitly set c99 in CMake
5
6See #869
7
8[Retrieved from:
9https://github.com/redis/hiredis/commit/13a35bdb64615e381c5e1151cdd4e78bba71a6db]
10Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
11---
12 CMakeLists.txt | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/CMakeLists.txt b/CMakeLists.txt
16index 1beccc69a..4cbd438d7 100644
17--- a/CMakeLists.txt
18+++ b/CMakeLists.txt
19@@ -22,6 +22,9 @@ MESSAGE("Detected version: ${VERSION}")
20
21 PROJECT(hiredis VERSION "${VERSION}")
22
23+# Hiredis requires C99
24+SET(CMAKE_C_STANDARD 99)
25+
26 SET(ENABLE_EXAMPLES OFF CACHE BOOL "Enable building hiredis examples")
27
28 SET(hiredis_sources
29