Since event.h is not part of tinc, we include it in have.h were all other
system header files are included. We also ensure -levent comes before -lgdi32
when compiling with MinGW, apparently it doesn't work when the order is
reversed.
#else
#define WINVER WindowsXP
#endif
+#define WIN32_LEAN_AND_MEAN
#include <w32api.h>
#include <windows.h>
#include <ws2tcpip.h>
#include <netinet/if_ether.h>
#endif
+#ifdef HAVE_EVENT_H
+#include <event.h>
+#endif
+
#endif /* __TINC_SYSTEM_H__ */
)
AC_CHECK_LIB(event, event_init,
- [LIBS="$LIBS -levent"],
+ [LIBS="-levent $LIBS"],
[AC_MSG_ERROR("libevent libraries not found.")]
)
])
#ifndef __TINC_NET_H__
#define __TINC_NET_H__
-#include <event.h>
-
#include "ipv6.h"
#include "cipher.h"
#include "digest.h"
#ifndef __TINC_NODE_H__
#define __TINC_NODE_H__
-#include <event.h>
-
#include "splay_tree.h"
#include "cipher.h"
#include "connection.h"