From 3877722a08a7be0e847ca660b5be5113a54e22e1 Mon Sep 17 00:00:00 2001 From: chenliangyu Date: Fri, 17 Mar 2023 15:00:12 +0800 Subject: [PATCH] fix compile error on centos 7.5 --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1601079a4..bfa3508ef 100644 --- a/Makefile +++ b/Makefile @@ -26,12 +26,16 @@ ifeq ($(UNAME_S),Darwin) endif endif +ifneq ($(CC), gcc) + CC=gcc +endif + # # Compile flags # -CFLAGS = -I. -O3 -DNDEBUG -std=c11 -fPIC -CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC +CFLAGS = -I. -O3 -DNDEBUG -std=c11 -fPIC -D_POSIX_C_SOURCE=199309L +CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC -D_POSIX_C_SOURCE=199309L LDFLAGS = # OS specific