There are at least 3 problems. 1. The redirects for Linux glibc often have @*, musl doesn't. Need to add musl-specific redirects. 2. As a consequence of 2. the expecteds all contain @*. For FreeBSD I added an awk filter to add the required @*, should be possible to reuse the filter. 3. pthread_rwlock functions are implemented in using other public pthread_rwlock functions, e.g. https://elixir.bootlin.com/musl/latest/source/src/thread/pthread_rwlock_rdlock.c which causes spurious recursive lock warnings. Only the innermost function should be redirected (not great for error messages).