From 81fe55ef317b826a3418a7bc440375469f00a5f0 Mon Sep 17 00:00:00 2001 From: Ti-Yen Yen Date: Fri, 9 Oct 2020 13:50:31 -0700 Subject: [PATCH] Build successfully with clang --- Makefile | 3 +++ src/base/io/io.c | 1 + 2 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 583bc25bc6..e8bcd4edd1 100644 --- a/Makefile +++ b/Makefile @@ -129,9 +129,12 @@ CFLAGS += -Wno-unused-but-set-variable endif else $(info $(MSG_PREFIX)Found GCC_MAJOR>=5) +CLANG_HEADER=$(shell $(CC) --version | grep -w clang) +ifeq (,$(CLANG_HEADER)) CFLAGS += -Wno-unused-but-set-variable endif endif +endif endif diff --git a/src/base/io/io.c b/src/base/io/io.c index c2363cb520..d483bbf6ee 100644 --- a/src/base/io/io.c +++ b/src/base/io/io.c @@ -18,6 +18,7 @@ ***********************************************************************/ +#include #include "ioAbc.h" #include "base/main/mainInt.h" #include "aig/saig/saig.h"