From 56bae344fff4e7c69466346d7d455246f0211ed0 Mon Sep 17 00:00:00 2001 From: MiniLight Date: Mon, 3 Oct 2016 00:38:15 +0800 Subject: [PATCH] try to avoid the error "conflicting declaration 'typedef DWORD pthread_t'" etc. --- src/windows/port.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/windows/port.h b/src/windows/port.h index d78a1854f..819846151 100755 --- a/src/windows/port.h +++ b/src/windows/port.h @@ -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; @@ -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);