23d74e0caf3bf1191d3cfbd7ad0300319796a5aa
[openwrt/staging/chunkeey.git] / package / devel / valgrind / patches / 200-musl_fix.patch
1 --- a/coregrind/vg_preloaded.c
2 +++ b/coregrind/vg_preloaded.c
3 @@ -56,7 +56,7 @@
4 void VG_NOTIFY_ON_LOAD(freeres)( void );
5 void VG_NOTIFY_ON_LOAD(freeres)( void )
6 {
7 -# if !defined(__UCLIBC__) \
8 +# if !defined(__UCLIBC__) && defined(__GLIBC__) \
9 && !defined(VGPV_arm_linux_android) \
10 && !defined(VGPV_x86_linux_android) \
11 && !defined(VGPV_mips32_linux_android) \
12 --- a/include/pub_tool_redir.h
13 +++ b/include/pub_tool_redir.h
14 @@ -242,7 +242,7 @@
15 /* --- Soname of the standard C library. --- */
16
17 #if defined(VGO_linux) || defined(VGO_solaris)
18 -# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so*
19 +# define VG_Z_LIBC_SONAME libcZdZa // libc.*
20
21 #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
22 # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib
23 @@ -274,7 +274,11 @@
24 /* --- Soname of the pthreads library. --- */
25
26 #if defined(VGO_linux)
27 +# if defined(__GLIBC__) || defined(__UCLIBC__)
28 # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0
29 +# else
30 +# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.*
31 +# endif
32 #elif defined(VGO_darwin)
33 # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib
34 #elif defined(VGO_solaris)
35 --- a/configure.ac
36 +++ b/configure.ac
37 @@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in
38 ;;
39 2.0|2.1|*)
40 AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
41 - AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,])
42 - AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc])
43 ;;
44 esac
45