aboutsummaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-12-01 15:04:48 +0000
committerGravatar Sadie Powell2024-12-01 15:04:48 +0000
commitdbc17141d5e22a6b1e4fc4ebfc592603933777be (patch)
tree7c50a2f2146e561df1b87e0bfdab12bac1cde361 /src/socket.cpp
parentAdd a command for rehashing TLS profiles to the helper script. (diff)
Fix some compiler warnings when building on Haiku.
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp4
1 files changed, 2 insertions, 2 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<ConfigTag>& tag, const irc::sockets::sockaddrs& sa, std::vector<ListenSocket*>& old_ports, sa_family_t protocol)