diff options
author | Sebastian Sjöberg <Sebastian.Sjoberg@axis.com> | 2010-04-14 15:42:57 -0400 |
---|---|---|
committer | Sebastian Sjöberg <Sebastian.Sjoberg@axis.com> | 2010-04-14 15:42:57 -0400 |
commit | 899c1dcc9807650ec90e0d5c847d2997fce9b751 (patch) | |
tree | 3d8a5d5eecaa8e29a17471981ad1b7f8122dd900 /bufferevent_async.c | |
parent | 0861d1708ba6d035ff4c834e2aac0b5855f64afa (diff) | |
download | libevent-899c1dcc9807650ec90e0d5c847d2997fce9b751.tar.gz |
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)
Diffstat (limited to 'bufferevent_async.c')
-rw-r--r-- | bufferevent_async.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |