Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.