Well this is disturbing. We probably need to fix gcc here (and a lot of code in the wild may be broken) because musl has no such locking where it doesn't belong.