Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
[Windows] Compile fixes with MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
ariya committed Nov 29, 2019
1 parent 3789743 commit c4b1a9b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crashdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ init_crash_handler_os()
// When the app crashes, don't print the abort message
// and don't call Dr. Watson to make a crash dump.
// http://msdn.microsoft.com/en-us/library/e631wekh(v=VS.100).aspx
#ifndef __MINGW32__
_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);

#endif

#if _MSC_VER >= 1400
_set_invalid_parameter_handler(invalid_parameter_handler);
Expand Down
2 changes: 2 additions & 0 deletions src/mongoose/mongoose.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,12 @@ typedef struct {HANDLE signal, broadcast;} pthread_cond_t;
typedef DWORD pthread_t;
#define pid_t HANDLE // MINGW typedefs pid_t to int. Using #define here.

#ifndef __MINGW32__
struct timespec {
long tv_nsec;
long tv_sec;
};
#endif

static int pthread_mutex_lock(pthread_mutex_t *);
static int pthread_mutex_unlock(pthread_mutex_t *);
Expand Down

0 comments on commit c4b1a9b

Please sign in to comment.