From ea6b8a432185bd179d58e2d10455514aeee670a9 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Wed, 16 May 2018 09:57:06 +0200 Subject: [PATCH] contrib: pthreads: fix warning in headers --- contrib/src/pthreads/pthreads-fix-warning.patch | 20 ++++++++++++++++++++ contrib/src/pthreads/rules.mak | 1 + 2 files changed, 21 insertions(+) create mode 100644 contrib/src/pthreads/pthreads-fix-warning.patch diff --git a/contrib/src/pthreads/pthreads-fix-warning.patch b/contrib/src/pthreads/pthreads-fix-warning.patch new file mode 100644 index 0000000000..3e7aa2fbb3 --- /dev/null +++ b/contrib/src/pthreads/pthreads-fix-warning.patch @@ -0,0 +1,20 @@ +--- pthreads/pthread.h 2018-05-16 09:51:14.092544900 +0200 ++++ pthreads/pthread.h.warning 2018-05-16 09:50:54.762826300 +0200 +@@ -105,6 +105,7 @@ + #define PTW32_LEVEL_MAX 3 + + #if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112 ) || !defined(PTW32_LEVEL) ++#undef PTW32_LEVEL + #define PTW32_LEVEL PTW32_LEVEL_MAX + /* Include everything */ + #endif +--- pthreads/sched.h 2018-05-16 09:55:09.844370300 +0200 ++++ pthreads/sched.h.warning 2018-05-16 09:54:53.024845400 +0200 +@@ -61,6 +61,7 @@ + #define PTW32_SCHED_LEVEL_MAX 3 + + #if ( defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112 ) || !defined(PTW32_SCHED_LEVEL) ++#undef PTW32_SCHED_LEVEL + #define PTW32_SCHED_LEVEL PTW32_SCHED_LEVEL_MAX + /* Include everything */ + #endif diff --git a/contrib/src/pthreads/rules.mak b/contrib/src/pthreads/rules.mak index 8ddac0ff40..223a7db742 100644 --- a/contrib/src/pthreads/rules.mak +++ b/contrib/src/pthreads/rules.mak @@ -23,6 +23,7 @@ endif $(APPLY) $(SRC)/pthreads/remove-inline.patch $(APPLY) $(SRC)/pthreads/x86-inline-asm.patch $(APPLY) $(SRC)/pthreads/arm64.patch + $(APPLY) $(SRC)/pthreads/pthreads-fix-warning.patch $(MOVE) ifdef HAVE_CROSS_COMPILE -- 2.11.4.GIT