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

Commit

Permalink
Fix building with MSVC2015
Browse files Browse the repository at this point in the history
  • Loading branch information
vitallium committed May 19, 2016
1 parent f6b508d commit 5d99f2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/linenoise/src/linenoise.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@
#else
/* Microsoft headers don't like old POSIX names */
#define strdup _strdup

#if _MSC_VER < 1900
#define snprintf _snprintf
#endif

#endif
#else
#include <termios.h>
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.

#if _MSC_VER < 1900
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 5d99f2a

Please sign in to comment.