[vlc-commits] contrib: pthreads: fix warning in headers

Steve Lhomme git at videolan.org
Wed May 16 15:53:26 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed May 16 09:57:06 2018 +0200| [ea6b8a432185bd179d58e2d10455514aeee670a9] | committer: Steve Lhomme

contrib: pthreads: fix warning in headers

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ea6b8a432185bd179d58e2d10455514aeee670a9
---

 contrib/src/pthreads/pthreads-fix-warning.patch | 20 ++++++++++++++++++++
 contrib/src/pthreads/rules.mak                  |  1 +
 2 files changed, 21 insertions(+)

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



More information about the vlc-commits mailing list