Sure.

On Thu, 12 Mar 2020 at 18:51, Liu Hao <[email protected]> wrote:
>
> 在 2020/3/12 23:21, Egor Pugin 写道:
> > patch file
> >
> >
>
> Please substitute '.patch' extensions for '.txt' before sending, or send
> the patch inline.
>
>
> --
> Best regards,
> LH_Mouse
>


-- 
Egor Pugin
diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h 
b/mingw-w64-libraries/winpthreads/include/pthread.h
index 4c2affd3..902ffb1b 100644
--- a/mingw-w64-libraries/winpthreads/include/pthread.h
+++ b/mingw-w64-libraries/winpthreads/include/pthread.h
@@ -82,6 +82,7 @@ extern "C" {
 /* MSB 8-bit major version, 8-bit minor version, 16-bit patch level.  */
 #define __WINPTHREADS_VERSION 0x00050000
 
+#if !defined(WINPTHREAD_API)
 #if defined DLL_EXPORT
 #ifdef IN_WINPTHREAD
 #define WINPTHREAD_API __declspec(dllexport)
@@ -91,6 +92,7 @@ extern "C" {
 #else
 #define WINPTHREAD_API
 #endif
+#endif
 
 /* #define WINPTHREAD_DBG 1 */
 
@@ -108,6 +110,20 @@ extern "C" {
 #define EWOULDBLOCK    140
 #endif
 
+/* Windows doesn't have this, so declare it ourselves. */
+#ifndef _TIMESPEC_DEFINED
+#define _TIMESPEC_DEFINED
+struct timespec {
+  time_t  tv_sec;   /* Seconds */
+  long    tv_nsec;  /* Nanoseconds */
+};
+
+struct itimerspec {
+  struct timespec  it_interval;  /* Timer period */
+  struct timespec  it_value;     /* Timer expiration */
+};
+#endif
+
 /* pthread specific defines.  */
 
 #define PTHREAD_CANCEL_DISABLE 0
@@ -214,20 +230,6 @@ struct _pthread_cleanup
 #define pthread_cleanup_pop(E)\
     (*pthread_getclean() = _pthread_cup.next, ((E) ? 
(_pthread_cup.func((pthread_once_t *)_pthread_cup.arg)) : (void)0));}
 
-/* Windows doesn't have this, so declare it ourselves. */
-#ifndef _TIMESPEC_DEFINED
-#define _TIMESPEC_DEFINED
-struct timespec {
-  time_t  tv_sec;   /* Seconds */
-  long    tv_nsec;  /* Nanoseconds */
-};
-
-struct itimerspec {
-  struct timespec  it_interval;  /* Timer period */
-  struct timespec  it_value;     /* Timer expiration */
-};
-#endif
-
 #ifndef SCHED_OTHER
 /* Some POSIX realtime extensions, mostly stubbed */
 #define SCHED_OTHER     0
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to