From dbc17141d5e22a6b1e4fc4ebfc592603933777be Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 1 Dec 2024 15:04:48 +0000 Subject: [PATCH] Fix some compiler warnings when building on Haiku. --- src/socket.cpp | 4 ++-- src/socketengine.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/socket.cpp b/src/socket.cpp index 231ab185c..f8564b9d1 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -36,19 +36,19 @@ namespace { +#ifdef IPPROTO_SCTP // Checks whether the system can create SCTP sockets. bool CanCreateSCTPSocket() { -#ifdef IPPROTO_SCTP int fd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); if (fd >= 0) { SocketEngine::Close(fd); return true; } -#endif return false; } +#endif } bool InspIRCd::BindPort(const std::shared_ptr& tag, const irc::sockets::sockaddrs& sa, std::vector& old_ports, sa_family_t protocol) diff --git a/src/socketengine.cpp b/src/socketengine.cpp index a16446ff6..15db2b866 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -244,9 +244,9 @@ ssize_t SocketEngine::SendTo(EventHandler* eh, const void* buf, size_t len, int return nbSent; } -ssize_t SocketEngine::WriteV(EventHandler* eh, const IOVector* iovec, int count) +ssize_t SocketEngine::WriteV(EventHandler* eh, const IOVector* iov, int count) { - ssize_t sent = writev(eh->GetFd(), iovec, count); + ssize_t sent = writev(eh->GetFd(), iov, count); stats.UpdateWriteCounters(sent); return sent; }