aboutsummaryrefslogtreecommitdiff
path: root/gmid.h
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-10-02 17:20:56 +0000
committerOmar Polo <op@omarpolo.com>2021-10-02 17:20:56 +0000
commitefb6210d7745c9466ab9a16f23d1549523428ef7 (patch)
tree9c287cc366336974a847abb2bcc963fc99b0ae56 /gmid.h
parentd0071d8321dc1e718a8146a888db155d1dc24be1 (diff)
improve libevent2 handling
* add configure check * change the way the headers are required (copied from tmux)
Diffstat (limited to 'gmid.h')
-rw-r--r--gmid.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/gmid.h b/gmid.h
index 749ccaa..53fbca9 100644
--- a/gmid.h
+++ b/gmid.h
@@ -26,7 +26,6 @@
#include <netinet/in.h>
#include <dirent.h>
-#include <event.h>
#include <limits.h>
#include <netdb.h>
#include <signal.h>
@@ -38,6 +37,19 @@
#include <openssl/x509.h>
+#if HAVE_EVENT2
+# include <event2/event.h>
+# include <event2/event_compat.h>
+# include <event2/event_struct.h>
+# include <event2/buffer.h>
+# include <event2/buffer_compat.h>
+# include <event2/bufferevent.h>
+# include <event2/bufferevent_struct.h>
+# include <event2/bufferevent_compat.h>
+#else
+# include <event.h>
+#endif
+
#define GMID_STRING "gmid " VERSION
#define GMID_VERSION "gmid/" VERSION