]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cmake,common/RWLock: check for libpthread extensions
authorKefu Chai <kchai@redhat.com>
Tue, 28 Nov 2017 07:21:55 +0000 (15:21 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 28 Nov 2017 15:50:36 +0000 (23:50 +0800)
commitcf50fb941e98f40280c73c23ee1bce39472af658
treeb2b076d03a18b3a22b70d92d118cb373165b4220
parent993b5f304e4b61dda6b8592679b6fcd86764fdcc
cmake,common/RWLock: check for libpthread extensions

pthread_rwlockattr_setkind_np() is a GNU extension of libpthread. and
Tianshan Qu pointed out, we cannot use
ifdef(PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) to detect the
availability of this function, because it's an enum not a macro. so,
like other *_np() extensions, we check this one also using cmake at
the configure phase.

Reported-by: Tianshan Qu <tianshan@xsky.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
src/common/RWLock.h
src/include/config-h.in.cmake