Skip to content

Commit 03ef729

Browse files
committed
Fix Linux build
1 parent 4520e6e commit 03ef729

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

example/sample-projects/system-architecture-no-deps/client/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
#include "AlarmMgr.h"
1414
#include "DataMgr.h"
1515
#include "ClientApp.h"
16-
#include "predef/util/WinsockConnect.h"
1716
#include <thread>
1817

18+
#ifdef _WIN32
19+
#include "predef/util/WinsockConnect.h"
20+
#endif
21+
1922
#ifdef DMQ_LOG
2023
#ifdef _WIN32
2124
// https://github.com/gabime/spdlog
@@ -74,8 +77,10 @@ int main()
7477
#endif
7578
#endif
7679

80+
#ifdef _WIN32
7781
// Starts Winsock now; automatically cleans up when main exits.
7882
WinsockContext wsContext;
83+
#endif
7984

8085
std::cout << "Client start!" << std::endl;
8186

example/sample-projects/system-architecture-no-deps/server/main.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
#include "NetworkMgr.h"
1313
#include "AlarmMgr.h"
1414
#include "ServerApp.h"
15-
#include "predef/util/WinsockConnect.h"
1615
#include <thread>
1716

17+
#ifdef _WIN32
18+
#include "predef/util/WinsockConnect.h"
19+
#endif
20+
1821
#ifdef DMQ_LOG
1922
#ifdef _WIN32
2023
// https://github.com/gabime/spdlog
@@ -53,8 +56,10 @@ int main()
5356
#endif
5457
#endif
5558

59+
#ifdef _WIN32
5660
// Starts Winsock now; automatically cleans up when main exits.
5761
WinsockContext wsContext;
62+
#endif
5863

5964
std::cout << "Server start!" << std::endl;
6065

0 commit comments

Comments
 (0)