From 899c1dcc9807650ec90e0d5c847d2997fce9b751 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Sj=C3=B6berg?= Date: Wed, 14 Apr 2010 15:42:57 -0400 Subject: Replace EVUTIL_CLOSESOCKET macro with a function The EVUTIL_CLOSESOCKET() macro required you to include unistd.h in your source for POSIX. We might as well turn it into a function: an extra function call is going to be cheap in comparison with the system call. We retain the EVUTIL_CLOSESOCKET() macro as an alias for the new evutil_closesocket() function. (commit message from email by Nick and Sebastian) --- bufferevent_async.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bufferevent_async.c') diff --git a/bufferevent_async.c b/bufferevent_async.c index 480f44a7..9079f7ea 100644 --- a/bufferevent_async.c +++ b/bufferevent_async.c @@ -285,7 +285,7 @@ be_async_destruct(struct bufferevent *bev) /* delete this in case non-blocking connect was used */ event_del(&bev->ev_write); if (bev_p->options & BEV_OPT_CLOSE_ON_FREE) - EVUTIL_CLOSESOCKET(fd); + evutil_closesocket(fd); _bufferevent_del_generic_timeout_cbs(bev); } -- cgit v1.2.1