Skip to content

Commit 4d8da6a

Browse files
committed
Windows byte-order functions
1 parent cbd5f36 commit 4d8da6a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

include/DMDUtil/DMD.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
#define DMDUTIL_MAX_PATH_SIZE 256
1616
#define DMDUTIL_MAX_TRANSITIONAL_FRAME_DURATION 25
1717

18-
#include <arpa/inet.h>
18+
#if defined(_WIN32) || defined(_WIN64)
19+
#include <winsock2.h> // Windows byte-order functions
20+
#else
21+
#include <arpa/inet.h> // Linux/macOS byte-order functions
22+
#endif
1923

2024
#include <atomic>
2125
#include <condition_variable>

src/dmdServer.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
#include <arpa/inet.h>
1+
#if defined(_WIN32) || defined(_WIN64)
2+
#include <winsock2.h> // Windows byte-order functions
3+
#else
4+
#include <arpa/inet.h> // Linux/macOS byte-order functions
5+
#endif
26

37
#include <algorithm>
48
#include <chrono>

0 commit comments

Comments
 (0)