add chaos_calmer branch
[15.05/openwrt.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) && !defined(VGPV_x86_linux_android) \
10     && !defined(VGPV_mips32_linux_android)
11     extern void __libc_freeres(void);
12 --- a/include/pub_tool_redir.h
13 +++ b/include/pub_tool_redir.h
14 @@ -241,7 +241,7 @@
15  /* --- Soname of the standard C library. --- */
16  
17  #if defined(VGO_linux)
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 @@ -273,7 +273,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  #else
35 --- a/configure.ac
36 +++ b/configure.ac
37 @@ -1031,8 +1031,6 @@ case "${GLIBC_VERSION}" in
38  
39       *)
40         AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
41 -       AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.19])
42 -       AC_MSG_ERROR([or Darwin or Bionic libc])
43         ;;
44  esac
45