From 1d6ab66c1c9f22608cfb6785bba9cd2ea2d07fd1 Mon Sep 17 00:00:00 2001
From: Tom Uram <turam@anl.gov>
Date: Fri, 12 Apr 2019 17:40:12 -0500
Subject: [PATCH] Set flag for gnu99 on Linux only, to fix MacOS build

---
 GNUmakefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 5a0d6c0..d05c0e4 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -67,12 +67,18 @@ ifeq ($(UNAME_S),Linux)
     OPENMPFLAG=-fopenmp
 endif
 
+# Use gnu99 only on Linux
+# (ideally we would trigger on compiler rather than platform)
+ifeq ($(UNAME_S),Linux)
+    G99FLAG=-std=gnu99
+endif
+
 FEDIR = frontend
-FE_CFLAGS := -g -fPIC -O3 $(OPENMPFLAG) -std=gnu99
+FE_CFLAGS := -g -fPIC -O3 $(OPENMPFLAG) $(G99FLAG)
 FE_CPPFLAGS := $(BASE_CPPFLAGS) -Ithirdparty/sqlite -DGENERICIO_NO_MPI
 
 MPIDIR = mpi
-MPI_CFLAGS := -g -O3 $(OPENMPFLAG) -std=gnu99
+MPI_CFLAGS := -g -O3 $(OPENMPFLAG) $(G99FLAG)
 MPI_CPPFLAGS := $(BASE_CPPFLAGS)
 
 $(FEDIR):
-- 
GitLab