From 275a2d49cc34f21ebc2b0651e78cd935fb42bc28 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 30 Oct 2018 13:23:43 +0000 Subject: [PATCH] Fix clang build. Some math functions require c11 standard. --- src/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 912cbc19..eec172d0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -20,7 +20,11 @@ DEPENDENCY_TARGETS=hiredis linenoise lua NODEPS:=clean distclean # Default settings -STD=-std=c99 -pedantic -DREDIS_STATIC='' +ifneq ($(CC),clang) + STD=-std=c99 -pedantic -DREDIS_STATIC='' +else + STD=-std=c11 -pedantic -DREDIS_STATIC='' +endif WARN=-Wall -W -Wno-missing-field-initializers OPT=$(OPTIMIZATION)