]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
autotools ./configure don't like compat.h
authorDavid Sommerseth <davids@redhat.com>
Wed, 11 Jan 2012 13:52:21 +0000 (14:52 +0100)
committerDavid Sommerseth <davids@redhat.com>
Wed, 11 Jan 2012 19:14:50 +0000 (20:14 +0100)
The compat.h include file cannot be loaded when ./configure runs,
as many of the HAVE_* declarations are not set.  This makes test
compilations when looking for features fail.

As ./configure will load syshead.h, it pulls in compat.h this way.
Looking more carefully at syshead.h, there's a #ifndef PACKAGE_NAME
check if config.h should be included.  This looks like a check if
syshead.h is loaded via ./configure or if it is a more normal
compilation.  Moving the compat.h inclusion into this #ifndef block.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
syshead.h

index fba6f84ec3956d2e76bfc45f6775c6b3823fb15c..f1211142b304fce0b48214dfc947748805499d81 100644 (file)
--- a/syshead.h
+++ b/syshead.h
@@ -34,9 +34,9 @@
 #endif
 #ifndef PACKAGE_NAME
 #include "config.h"
+#include "compat.h"
 #endif
 
-#include "compat.h"
 
 /* branch prediction hints */
 #if defined(__GNUC__)