head 1.2; access; symbols; locks; strict; comment @// @; 1.2 date 2019.05.10.09.40.01; author nia; state dead; branches; next 1.1; commitid yy5GUaNQdWyOMDmB; 1.1 date 2019.05.03.17.14.28; author nia; state Exp; branches; next ; commitid dSxTLVDANjJ8wMlB; desc @@ 1.2 log @inspircd3: Update to 3.0.1 This release contains minor bug fixes and documentation corrections. Most notably: * Fixed building on NetBSD. * Fixed building on Windows. * Fixed building with older libc implementations. * Fixed setting a distribution label. * Fixed higher values not being shown in MAXLIST. (This mainly means workarounds can be deleted from pkgsrc). @ text @$NetBSD: patch-src_socketengines_socketengine__kqueue.cpp,v 1.1 2019/05/03 17:14:28 nia Exp $ udata is intptr_t in NetBSD. https://github.com/inspircd/inspircd/commit/0c992c5a3d6b30a6b14adf3181bf0b1e1fdeab48 --- src/socketengines/socketengine_kqueue.cpp.orig 2019-05-03 13:07:32.000000000 +0000 +++ src/socketengines/socketengine_kqueue.cpp @@@@ -87,7 +87,11 @@@@ bool SocketEngine::AddFd(EventHandler* e // We always want to read from the socket... struct kevent* ke = GetChangeKE(); +#ifdef __NetBSD__ + EV_SET(ke, fd, EVFILT_READ, EV_ADD, 0, 0, reinterpret_cast(eh)); +#else EV_SET(ke, fd, EVFILT_READ, EV_ADD, 0, 0, static_cast(eh)); +#endif ServerInstance->Logs->Log("SOCKET", LOG_DEBUG, "New file descriptor: %d", fd); @@@@ -128,7 +132,11 @@@@ void SocketEngine::OnSetEvent(EventHandl { // new poll-style write struct kevent* ke = GetChangeKE(); +#ifdef __NetBSD__ + EV_SET(ke, eh->GetFd(), EVFILT_WRITE, EV_ADD, 0, 0, reinterpret_cast(eh)); +#else EV_SET(ke, eh->GetFd(), EVFILT_WRITE, EV_ADD, 0, 0, static_cast(eh)); +#endif } else if ((old_mask & FD_WANT_POLL_WRITE) && !(new_mask & FD_WANT_POLL_WRITE)) { @@@@ -139,7 +147,11 @@@@ void SocketEngine::OnSetEvent(EventHandl if ((new_mask & (FD_WANT_FAST_WRITE | FD_WANT_SINGLE_WRITE)) && !(old_mask & (FD_WANT_FAST_WRITE | FD_WANT_SINGLE_WRITE))) { struct kevent* ke = GetChangeKE(); +#ifdef __NetBSD__ + EV_SET(ke, eh->GetFd(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, reinterpret_cast(eh)); +#else EV_SET(ke, eh->GetFd(), EVFILT_WRITE, EV_ADD | EV_ONESHOT, 0, 0, static_cast(eh)); +#endif } } @@@@ -161,7 +173,11 @@@@ int SocketEngine::DispatchEvents() for (int j = 0; j < i; j++) { struct kevent& kev = ke_list[j]; +#ifdef __NetBSD__ + EventHandler* eh = reinterpret_cast(kev.udata); +#else EventHandler* eh = static_cast(kev.udata); +#endif if (!eh) continue; @ 1.1 log @chat/inspircd3: Add version 3.0.0. This release contains many major new enhancements, some of which include: * Full support for all currently ratified IRCv3 extensions. * Support for WebSocket connections. * Support for the bcrypt and PBKDF2 password hashing algorithms. * Support for the WHOX extension. * Support for UNIX socket connections. * Support for the HAProxy PROXY protocol. * Many performance improvements. To upgrade from v2 (chat/inspircd) please consult the list of config changes: https://docs.inspircd.org/3/configuration-changes/ @ text @d1 1 a1 1 $NetBSD$ @