File tree 3 files changed +14
-8
lines changed
3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 8
8
#pragma once
9
9
10
10
#include <cerrno>
11
- #include "ofConstants.h"
12
-
13
11
14
12
#ifdef TARGET_WIN32
15
13
#include <WinSock2.h>
19
17
#define OFXNETWORK_ERROR (name ) E ## name
20
18
#endif
21
19
20
+ // WinSock2.h has to be included before windows.h
21
+ #include "ofConstants.h"
22
+
23
+
22
24
/**
23
25
* @brief Log the latest network error and where it happened (file and line)
24
26
*
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ SetTimeoutAccept()
42
42
SetTimeoutReceive()
43
43
44
44
****************************************************************/
45
- #include " ofConstants.h"
46
45
#include < string.h>
47
46
#include < wchar.h>
48
47
#include < stdio.h>
@@ -82,6 +81,10 @@ SetTimeoutReceive()
82
81
#include < ws2tcpip.h> // TCP/IP annex needed for multicasting
83
82
#endif
84
83
84
+ // windows.h after winsock2.h
85
+ #include " ofConstants.h"
86
+
87
+
85
88
// --------------------------------------------------------------------------------
86
89
class InetAddr : public sockaddr_in
87
90
{
Original file line number Diff line number Diff line change @@ -62,11 +62,7 @@ UDP Multicast (receiving):
62
62
x) Close()
63
63
64
64
--------------------------------------------------------------------------------*/
65
- #include " ofConstants.h"
66
- #include " ofxUDPSettings.h"
67
- #include < string.h>
68
- #include < wchar.h>
69
- #include < stdio.h>
65
+
70
66
71
67
#ifndef TARGET_WIN32
72
68
@@ -104,6 +100,11 @@ x) Close()
104
100
// / Socket constants.
105
101
#define SOCKET_TIMEOUT SOCKET_ERROR - 1
106
102
103
+ #include " ofConstants.h"
104
+ #include " ofxUDPSettings.h"
105
+ #include < string.h>
106
+ #include < wchar.h>
107
+ #include < stdio.h>
107
108
// --------------------------------------------------------------------------------
108
109
// --------------------------------------------------------------------------------
109
110
You can’t perform that action at this time.
0 commit comments