From: Etienne Dechamps Date: Sun, 17 May 2015 21:36:15 +0000 (+0100) Subject: Don't pollute the system header directory namespace. X-Git-Tag: release-1.1pre12~152 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=01d251986260faf306927aa91daff705ee0523d6;p=tinc Don't pollute the system header directory namespace. Since commit 13f9bc1ff199bea46d3dde391a848f119e2cc0f0, tinc passes the -I. option to the preprocessor so that version_git.h can be found during out-of-tree ("VPATH") builds. The problem is, this option also affects the directory search for files included *from* system headers. For example, on MinGW, unistd.h contains the following line: #include Which, due to -I. putting the tinc directory at the head of the search order, results in tinc's process.h being included instead of the file from MinGW. Hilarity ensues. This commit fixes the issue by using -iquote, which doesn't affect system headers. --- diff --git a/src/Makefile.am b/src/Makefile.am index 2ae43b03..a6489dfd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -260,4 +260,4 @@ if TUNEMU LIBS += -lpcap endif -AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -I. +AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote.