From: Matthew Fernandez Date: Tue, 5 Apr 2022 01:48:58 +0000 (-0700) Subject: LASi plugin: work around LASi exporting Freetype’s config.h X-Git-Tag: 4.0.0~117^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e52c99a84c1a16bae788a3f4307e4d2285b8e99;p=graphviz LASi plugin: work around LASi exporting Freetype’s config.h --- diff --git a/plugin/lasi/gvrender_lasi.cpp b/plugin/lasi/gvrender_lasi.cpp index 0534ab7c6..319f9544e 100644 --- a/plugin/lasi/gvrender_lasi.cpp +++ b/plugin/lasi/gvrender_lasi.cpp @@ -8,13 +8,22 @@ * Contributors: Details at https://graphviz.org *************************************************************************/ -#include "config.h" - #include #include #include #include +// Confusingly, Freetype (included transitively by LASi), ship their Autotools +// config.h. As a result, we get macros like `HAVE_FCNTL_H` injected from their +// headers, overriding ours. Suppress this and force ours into scope. +#ifdef HAVE_FCNTL_H +#undef HAVE_FCNTL_H +#endif +#ifdef HAVE_UNISTD_H +#undef HAVE_UNISTD_H +#endif +#include "config.h" + #include #include #include