Skip to content

Commit 69aff5d

Browse files
committed
update
1 parent 5c9688e commit 69aff5d

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

addons/ofxNetwork/src/ofxNetworkUtils.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#pragma once
99

1010
#include <cerrno>
11-
#include "ofConstants.h"
12-
1311

1412
#ifdef TARGET_WIN32
1513
#include <WinSock2.h>
@@ -19,6 +17,10 @@
1917
#define OFXNETWORK_ERROR(name) E ## name
2018
#endif
2119

20+
// WinSock2.h has to be included before windows.h
21+
#include "ofConstants.h"
22+
23+
2224
/**
2325
* @brief Log the latest network error and where it happened (file and line)
2426
*

addons/ofxNetwork/src/ofxTCPManager.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ SetTimeoutAccept()
4242
SetTimeoutReceive()
4343
4444
****************************************************************/
45-
#include "ofConstants.h"
4645
#include <string.h>
4746
#include <wchar.h>
4847
#include <stdio.h>
@@ -82,6 +81,10 @@ SetTimeoutReceive()
8281
#include <ws2tcpip.h> // TCP/IP annex needed for multicasting
8382
#endif
8483

84+
// windows.h after winsock2.h
85+
#include "ofConstants.h"
86+
87+
8588
//--------------------------------------------------------------------------------
8689
class InetAddr : public sockaddr_in
8790
{

addons/ofxNetwork/src/ofxUDPManager.h

+6-5
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ UDP Multicast (receiving):
6262
x) Close()
6363
6464
--------------------------------------------------------------------------------*/
65-
#include "ofConstants.h"
66-
#include "ofxUDPSettings.h"
67-
#include <string.h>
68-
#include <wchar.h>
69-
#include <stdio.h>
65+
7066

7167
#ifndef TARGET_WIN32
7268

@@ -104,6 +100,11 @@ x) Close()
104100
/// Socket constants.
105101
#define SOCKET_TIMEOUT SOCKET_ERROR - 1
106102

103+
#include "ofConstants.h"
104+
#include "ofxUDPSettings.h"
105+
#include <string.h>
106+
#include <wchar.h>
107+
#include <stdio.h>
107108
//--------------------------------------------------------------------------------
108109
//--------------------------------------------------------------------------------
109110

0 commit comments

Comments
 (0)