Skip to content

Commit

Permalink
fix: added winsock.h for win32, added Win32Toolchain.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaskowicz1 committed Dec 27, 2023
1 parent 9aced1c commit ce47f7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmake/Win32Toolchain.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
message("-- Building for windows (x86) with precompiled packaged dependencies")

ADD_DEFINITIONS(/bigobj)

SET(WINDOWS_32_BIT 1)

# BIG FAT STINKY KLUDGE
SET(CMAKE_CXX_COMPILER_WORKS 1)
3 changes: 3 additions & 0 deletions src/rconpp/utilities.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "utilities.h"

#ifdef _WIN32
#include <winsock2.h>
#endif
#include <cstring>

rconpp::packet rconpp::form_packet(const std::string_view data, int32_t id, int32_t type) {
Expand Down

0 comments on commit ce47f7c

Please sign in to comment.