commit: aa222c14bc8cb16654abcf7b809f09bc0ce6c512
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
AuthorDate: Wed Dec 13 01:11:53 2017 +0000
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
CommitDate: Wed Dec 13 01:11:53 2017 +0000
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=aa222c14
media-libs/mesa: fix ifdef guards in pthread patch
media-libs/mesa/files/mesa-17-musl-pthread.patch | 44 +++++++++---------------
1 file changed, 17 insertions(+), 27 deletions(-)
diff --git a/media-libs/mesa/files/mesa-17-musl-pthread.patch
b/media-libs/mesa/files/mesa-17-musl-pthread.patch
index a488b69..aac95af 100644
--- a/media-libs/mesa/files/mesa-17-musl-pthread.patch
+++ b/media-libs/mesa/files/mesa-17-musl-pthread.patch
@@ -1,49 +1,39 @@
diff -Naur mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c
mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c
---- mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c
2017-12-08 05:49:11.000000000 -0800
-+++ mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c 2017-12-11
14:24:00.264798233 -0800
-@@ -73,11 +73,8 @@
+--- mesa-17.3.0.orig/src/gallium/state_trackers/nine/nine_debug.c
2017-12-12 16:55:53.885552821 -0800
++++ mesa-17.3.0/src/gallium/state_trackers/nine/nine_debug.c 2017-12-12
17:09:36.048538098 -0800
+@@ -73,8 +73,8 @@
}
#if defined(HAVE_PTHREAD)
-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) &&
defined(__GLIBC_MINOR__) && \
- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
if (dbg_flags & DBG_TID)
tid = pthread_self();
--# endif
- #endif
-
- if (dbg_flags & flag) {
+ # endif
diff -Naur mesa-17.3.0.orig/src/util/u_thread.h mesa-17.3.0/src/util/u_thread.h
---- mesa-17.3.0.orig/src/util/u_thread.h 2017-12-08 05:49:11.000000000
-0800
-+++ mesa-17.3.0/src/util/u_thread.h 2017-12-11 14:19:54.898802627 -0800
-@@ -34,6 +34,7 @@
-
- #ifdef HAVE_PTHREAD
- #include <signal.h>
-+#include <sys/prctl.h>
- #endif
-
-
-@@ -61,10 +62,7 @@
+--- mesa-17.3.0.orig/src/util/u_thread.h 2017-12-12 16:55:53.915552820
-0800
++++ mesa-17.3.0/src/util/u_thread.h 2017-12-12 17:09:34.079538133 -0800
+@@ -61,8 +61,8 @@
static inline void u_thread_setname( const char *name )
{
#if defined(HAVE_PTHREAD)
-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) &&
defined(__GLIBC_MINOR__) && \
- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
-- pthread_setname_np(pthread_self(), name);
--# endif
-+ prctl(PR_SET_NAME, name);
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
+ pthread_setname_np(pthread_self(), name);
+ # endif
#endif
- (void)name;
- }
-@@ -92,10 +90,7 @@
+@@ -92,8 +92,8 @@
static inline bool u_thread_is_self(thrd_t thread)
{
#if defined(HAVE_PTHREAD)
-# if defined(__GNU_LIBRARY__) && defined(__GLIBC__) &&
defined(__GLIBC_MINOR__) && \
- (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12))
++# if defined(__linux__) && !(defined(__GLIBC__) || \
++ (__GLIBC__ < 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 12)))
return pthread_equal(pthread_self(), thread);
--# endif
+ # endif
#endif
- return false;
- }