Skip to content

Commit c4b1a9b

Browse files
committed
[Windows] Compile fixes with MinGW
1 parent 3789743 commit c4b1a9b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/crashdump.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ init_crash_handler_os()
119119
// When the app crashes, don't print the abort message
120120
// and don't call Dr. Watson to make a crash dump.
121121
// http://msdn.microsoft.com/en-us/library/e631wekh(v=VS.100).aspx
122+
#ifndef __MINGW32__
122123
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
123-
124+
#endif
124125

125126
#if _MSC_VER >= 1400
126127
_set_invalid_parameter_handler(invalid_parameter_handler);

src/mongoose/mongoose.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,12 @@ typedef struct {HANDLE signal, broadcast;} pthread_cond_t;
139139
typedef DWORD pthread_t;
140140
#define pid_t HANDLE // MINGW typedefs pid_t to int. Using #define here.
141141

142+
#ifndef __MINGW32__
142143
struct timespec {
143144
long tv_nsec;
144145
long tv_sec;
145146
};
147+
#endif
146148

147149
static int pthread_mutex_lock(pthread_mutex_t *);
148150
static int pthread_mutex_unlock(pthread_mutex_t *);

0 commit comments

Comments
 (0)