Actually, the first question to ask might be "are you using gcc"?
It looks to me like s_lock.h/s_lock.c don't have a non-gcc
implementation of tas() unless you define NEED_SPARC_TAS_ASM
... which src/include/port/solaris.h doesn't. Ugh.
regards, tom lane