c6e6a6628f7516fee1cb0d571561c07a596a7dd7
[librecmc/librecmc.git] / package / devel / valgrind / patches / 200-musl_fix.patch
1 --- a/coregrind/vg_preloaded.c
2 +++ b/coregrind/vg_preloaded.c
3 @@ -57,7 +57,7 @@
4  void VG_NOTIFY_ON_LOAD(freeres)(Vg_FreeresToRun to_run);
5  void VG_NOTIFY_ON_LOAD(freeres)(Vg_FreeresToRun to_run)
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 @@ -243,7 +243,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 @@ -275,7 +275,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 @@ -1047,8 +1047,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