Andrew Geissler | 4c19ea1 | 2020-10-27 13:52:24 -0500 | [diff] [blame] | 1 | The changes in 0001-drd-Port-to-Fedora-33.patch break builds on musl. These |
| 2 | need a __GLIBC__ guard to ensure musl builds continue to work. |
| 3 | |
| 4 | Upstream-Status: Pending |
| 5 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> |
| 6 | |
| 7 | Index: valgrind-3.16.1/drd/drd_pthread_intercepts.c |
| 8 | =================================================================== |
| 9 | --- valgrind-3.16.1.orig/drd/drd_pthread_intercepts.c |
| 10 | +++ valgrind-3.16.1/drd/drd_pthread_intercepts.c |
| 11 | @@ -180,6 +180,7 @@ static int never_true; |
| 12 | * functions in both libc and libpthread. Older glibc versions only have an |
| 13 | * implementation of the pthread functions in libpthread. |
| 14 | */ |
| 15 | +#ifdef __GLIBC__ |
| 16 | #define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \ |
| 17 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl; \ |
| 18 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl \ |
| 19 | @@ -187,6 +188,12 @@ static int never_true; |
| 20 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \ |
| 21 | ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \ |
| 22 | { return implf argl; } |
| 23 | +#else |
| 24 | +#define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \ |
| 25 | + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \ |
| 26 | + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \ |
| 27 | + { return implf argl; } |
| 28 | +#endif |
| 29 | #endif |
| 30 | |
| 31 | /** |