summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/connection.cpp4
-rw-r--r--src/net/connectionhandler.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/net/connection.cpp b/src/net/connection.cpp
index 42751050..aeda22a7 100644
--- a/src/net/connection.cpp
+++ b/src/net/connection.cpp
@@ -42,7 +42,7 @@ bool Connection::start(const std::string &address, int port)
enet_address_set_host(&enetAddress, address.c_str());
enetAddress.port = port;
-#ifdef defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF
+#if defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF
mLocal = enet_host_create(NULL /* create a client host */,
1 /* allow one outgoing connection */,
0 /* unlimited channel count */,
@@ -59,7 +59,7 @@ bool Connection::start(const std::string &address, int port)
return false;
// Initiate the connection, allocating channel 0.
-#ifdef defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF
+#if defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF
mRemote = enet_host_connect(mLocal, &enetAddress, 1, 0);
#else
mRemote = enet_host_connect(mLocal, &enetAddress, 1);
diff --git a/src/net/connectionhandler.cpp b/src/net/connectionhandler.cpp
index 314eb0f7..ec786663 100644
--- a/src/net/connectionhandler.cpp
+++ b/src/net/connectionhandler.cpp
@@ -46,7 +46,7 @@ bool ConnectionHandler::startListen(enet_uint16 port,
enet_address_set_host(&address, listenHost.c_str());
LOG_INFO("Listening on port " << port << "...");
-#ifdef defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF
+#if defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF
host = enet_host_create(
&address /* the address to bind the server host to */,
Configuration::getValue("net_maxClients", 1000) /* allowed connections */,