diff options
author | Omar Polo <op@omarpolo.com> | 2021-10-02 17:20:56 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-10-02 17:20:56 +0000 |
commit | efb6210d7745c9466ab9a16f23d1549523428ef7 (patch) | |
tree | 9c287cc366336974a847abb2bcc963fc99b0ae56 /gmid.h | |
parent | d0071d8321dc1e718a8146a888db155d1dc24be1 (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.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -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 |