From 4d42ffde6198aae45555dcc6fa1959fe93d29cb6 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 14 Apr 2022 07:33:08 -0700 Subject: [PATCH] cgraph: control Flex unistd.h suppression by whether we are on Windows Windows is the only non-unistd.h-having platform we support. Gitlab: #2204 --- lib/cgraph/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cgraph/CMakeLists.txt b/lib/cgraph/CMakeLists.txt index 0287f9259..53af6b2ca 100644 --- a/lib/cgraph/CMakeLists.txt +++ b/lib/cgraph/CMakeLists.txt @@ -5,7 +5,7 @@ FLEX_TARGET(Scan ${CMAKE_CURRENT_SOURCE_DIR}/scan.l ADD_FLEX_BISON_DEPENDENCY(Scan Grammar) add_definitions(-DEXPORT_CGRAPH -DEXPORT_AGXBUF -DEXPORT_CGHDR) -if(NOT HAVE_UNISTD_H) +if(WIN32 AND NOT MINGW) add_definitions(-DYY_NO_UNISTD_H) endif() -- 2.40.0