diff --git a/have.h b/have.h index 682fd2b7..92914ea0 100644 --- a/have.h +++ b/have.h @@ -37,6 +37,7 @@ #else #define WINVER WindowsXP #endif +#define WIN32_LEAN_AND_MEAN #include #include #include @@ -179,4 +180,8 @@ #include #endif +#ifdef HAVE_EVENT_H +#include +#endif + #endif /* __TINC_SYSTEM_H__ */ diff --git a/m4/libevent.m4 b/m4/libevent.m4 index 9bc9ae15..34bdef70 100644 --- a/m4/libevent.m4 +++ b/m4/libevent.m4 @@ -27,7 +27,7 @@ AC_DEFUN([tinc_LIBEVENT], ) AC_CHECK_LIB(event, event_init, - [LIBS="$LIBS -levent"], + [LIBS="-levent $LIBS"], [AC_MSG_ERROR("libevent libraries not found.")] ) ]) diff --git a/src/net.h b/src/net.h index f50b2bec..634e9e75 100644 --- a/src/net.h +++ b/src/net.h @@ -21,8 +21,6 @@ #ifndef __TINC_NET_H__ #define __TINC_NET_H__ -#include - #include "ipv6.h" #include "cipher.h" #include "digest.h" diff --git a/src/node.h b/src/node.h index 1e08c7ec..02e16c6c 100644 --- a/src/node.h +++ b/src/node.h @@ -21,8 +21,6 @@ #ifndef __TINC_NODE_H__ #define __TINC_NODE_H__ -#include - #include "splay_tree.h" #include "cipher.h" #include "connection.h"