[tor-commits] [tor/master] Remove event2/event.h include from compat_libevent.h

nickm at torproject.org nickm at torproject.org
Fri Apr 6 12:51:50 UTC 2018


commit f4bcf3f34c306300d200803a1db977a013a35470
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Oct 3 09:51:38 2017 -0400

    Remove event2/event.h include from compat_libevent.h
    
    Only one module was depending on this include (test_helpers.c), and
    it was doing so incorrectly.
---
 src/common/compat_libevent.h | 5 +++--
 src/test/test_helpers.c      | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/common/compat_libevent.h b/src/common/compat_libevent.h
index 1853e5091..318697864 100644
--- a/src/common/compat_libevent.h
+++ b/src/common/compat_libevent.h
@@ -7,8 +7,6 @@
 #include "orconfig.h"
 #include "testsupport.h"
 
-#include <event2/event.h>
-
 void configure_libevent_logging(void);
 void suppress_libevent_log_msg(const char *msg);
 
@@ -19,6 +17,9 @@ void suppress_libevent_log_msg(const char *msg);
   evdns_add_server_port_with_base(tor_libevent_get_base(), \
   (sock),(tcp),(cb),(data));
 
+struct event;
+struct event_base;
+
 void tor_event_free_(struct event *ev);
 #define tor_event_free(ev) \
   FREE_AND_NULL(struct event, tor_event_free_, (ev))
diff --git a/src/test/test_helpers.c b/src/test/test_helpers.c
index ab453d3bd..6ada64dcf 100644
--- a/src/test/test_helpers.c
+++ b/src/test/test_helpers.c
@@ -155,7 +155,7 @@ mock_tor_addr_lookup__fail_on_bad_addrs(const char *name,
 
 /* Helper for test_conn_get_connection() */
 static int
-fake_close_socket(evutil_socket_t sock)
+fake_close_socket(tor_socket_t sock)
 {
   (void)sock;
   return 0;





More information about the tor-commits mailing list