diff --git a/include/dpp/export.h b/include/dpp/export.h index 5ece08ef36..7895e79ec4 100644 --- a/include/dpp/export.h +++ b/include/dpp/export.h @@ -46,7 +46,6 @@ #else /* Including the library */ #ifdef _WIN32 - #include #define DPP_EXPORT __declspec(dllimport) #else #define DPP_EXPORT @@ -116,11 +115,7 @@ extern bool DPP_EXPORT validate_configuration(); } -#ifndef _WIN32 - #ifndef SOCKET - #define SOCKET int - #endif -#else +#ifdef _WIN32 #ifndef NOMINMAX #define NOMINMAX #endif diff --git a/include/dpp/socket.h b/include/dpp/socket.h index 04d1080035..d94914b35a 100644 --- a/include/dpp/socket.h +++ b/include/dpp/socket.h @@ -1,18 +1,16 @@ #pragma once -#ifndef _WIN32 -#ifndef SOCKET -#define SOCKET int -#endif -#endif - namespace dpp { /** * @brief Represents a socket file descriptor. * This is used to ensure parity between windows and unix-like systems. */ - typedef SOCKET socket; +#ifndef _WIN32 + using socket = int; +#else + using socket = SOCKET; +#endif } // namespace dpp #ifndef SOCKET_ERROR