Revert the remove of lock.h, it's needed for Bitrig.