summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2020-07-09 10:51:05 +0300
committerOrgad Shaneh <orgad.shaneh@audiocodes.com>2020-07-09 11:23:27 +0300
commitb8562df7609a43ff761959b52006b206c47a13e0 (patch)
tree8a8244c172f69ae67f05bfeb8a8d67ec6a63ddfb
parentad43f6bf2cd38a1bf5c224c6e35c895dff32a8bb (diff)
downloaddistcc-git-b8562df7609a43ff761959b52006b206c47a13e0.tar.gz
tempfile: Fix build on Cygwin/MSYS2
src is in the include paths (the Makefile has -Isrc), and it contains rpc.h, which collides with an internal header with the same name inside /usr/include/w32api. This leads to compiler errors. Fix by defining WIN32_LEAN_AND_MEAN, which prevents inclusion of rpc stuff.
-rw-r--r--src/tempfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tempfile.c b/src/tempfile.c
index 6890efb..9c46afe 100644
--- a/src/tempfile.c
+++ b/src/tempfile.c
@@ -52,6 +52,7 @@
#ifdef __CYGWIN32__
#define NOGDI
+ #define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif