lock: fix win32 pthread override
ifdef HAVE_PTHREAD_RWLOCK
SRCS += lock/rwlock.c
-else
-ifdef HAVE_PTHREAD
+else ifdef HAVE_PTHREAD
SRCS += lock/lock.c
-endif
-endif
-
-ifeq ($(OS),win32)
+else ifeq ($(OS),win32)
SRCS += lock/win32/lock.c
endif
