Skip to content

Commit

Permalink
Merge pull request google#127 from MinGW-caffe/master
Browse files Browse the repository at this point in the history
try to avoid the error "conflicting declaration 'typedef DWORD pthread_t'" etc. in MinGW
  • Loading branch information
ukai authored Oct 19, 2016
2 parents 5080258 + 9c584dd commit cf36dab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/windows/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ typedef int pid_t;
#endif // _MSC_VER

// ----------------------------------- THREADS
#ifndef __MINGW32__
typedef DWORD pthread_t;
typedef DWORD pthread_key_t;
typedef LONG pthread_once_t;
Expand All @@ -147,6 +148,7 @@ inline struct tm* localtime_r(const time_t* timep, struct tm* result) {
localtime_s(result, timep);
return result;
}
#endif

inline char* strerror_r(int errnum, char* buf, size_t buflen) {
strerror_s(buf, buflen, errnum);
Expand Down

0 comments on commit cf36dab

Please sign in to comment.