Skip to content

Commit 3861e2e

Browse files
authored
Merge pull request #3097 from cesanta/builtdoze
fix missing weird types
2 parents 21eefa4 + 07b4104 commit 3861e2e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

mongoose.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,12 +488,12 @@ typedef enum { false = 0, true = 1 } bool;
488488

489489
#include <process.h>
490490
#include <winerror.h>
491+
#include <winsock2.h> // fix missing macros and types
491492

492493
// For mg_random()
493494
#if defined(_MSC_VER) && _MSC_VER < 1700
494495
#ifndef _WIN32_WINNT
495496
#define _WIN32_WINNT 0x400 // Let vc98 pick up wincrypt.h
496-
#include <winsock2.h> // and fix missing macros
497497
#endif
498498
#include <wincrypt.h>
499499
#pragma comment(lib, "advapi32.lib")
@@ -526,7 +526,6 @@ typedef unsigned long nfds_t;
526526
#endif
527527

528528
#if MG_ENABLE_WINSOCK
529-
#include <winsock2.h>
530529

531530
#define MG_INVALID_SOCKET INVALID_SOCKET
532531
#define MG_SOCKET_TYPE SOCKET

src/arch_win32.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ typedef enum { false = 0, true = 1 } bool;
6666

6767
#include <process.h>
6868
#include <winerror.h>
69+
#include <winsock2.h> // fix missing macros and types
6970

7071
// For mg_random()
7172
#if defined(_MSC_VER) && _MSC_VER < 1700
7273
#ifndef _WIN32_WINNT
7374
#define _WIN32_WINNT 0x400 // Let vc98 pick up wincrypt.h
74-
#include <winsock2.h> // and fix missing macros
7575
#endif
7676
#include <wincrypt.h>
7777
#pragma comment(lib, "advapi32.lib")
@@ -104,7 +104,6 @@ typedef unsigned long nfds_t;
104104
#endif
105105

106106
#if MG_ENABLE_WINSOCK
107-
#include <winsock2.h>
108107

109108
#define MG_INVALID_SOCKET INVALID_SOCKET
110109
#define MG_SOCKET_TYPE SOCKET

0 commit comments

Comments
 (0)