# HG changeset patch # User David Demelier # Date 1446818940 -3600 # Node ID fb3158aca358b977fa1b0e478b7ae4e30f33c8c6 # Parent 5a9671dabb155482194860b61426004852da3e5d Socket: fix struct kevent which conflits with the function name diff -r 5a9671dabb15 -r fb3158aca358 C++/modules/Socket/Sockets.cpp --- a/C++/modules/Socket/Sockets.cpp Thu Nov 05 22:28:40 2015 +0100 +++ b/C++/modules/Socket/Sockets.cpp Fri Nov 06 15:09:00 2015 +0100 @@ -637,9 +637,9 @@ void Kqueue::update(Handle h, int filter, int kflags) { - kevent ev; + struct kevent ev; - EV_SET(&ev, h, filter, flags, 0, 0, nullptr); + EV_SET(&ev, h, filter, kflags, 0, 0, nullptr); if (kevent(m_handle, &ev, 1, nullptr, 0, nullptr) < 0) { throw Error{Error::System, "kevent"}; @@ -662,10 +662,10 @@ void Kqueue::unset(const ListenerTable &, Handle h, Condition condition, bool remove) { - if ((flags & Condition::Readable) == Condition::Readable) { + if ((condition & Condition::Readable) == Condition::Readable) { update(h, EVFILT_READ, EV_DELETE); } - if ((flags & Condition::Writable) == Condition::Writable) { + if ((condition & Condition::Writable) == Condition::Writable) { update(h, EVFILT_WRITE, EV_DELETE); } diff -r 5a9671dabb15 -r fb3158aca358 C++/modules/Socket/Sockets.h --- a/C++/modules/Socket/Sockets.h Thu Nov 05 22:28:40 2015 +0100 +++ b/C++/modules/Socket/Sockets.h Fri Nov 06 15:09:00 2015 +0100 @@ -2934,7 +2934,7 @@ */ class Kqueue { private: - std::vector m_result; + std::vector m_result; int m_handle; Kqueue(const Kqueue &) = delete;