]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake,common/RWLock: check for libpthread extensions 19269/head
authorKefu Chai <kchai@redhat.com>
Tue, 28 Nov 2017 07:21:55 +0000 (15:21 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 1 Dec 2017 02:36:42 +0000 (10:36 +0800)
commit3bfb493fa0c61f33ac930320f7b69ce4a96c2eb6
treec925a547e8b1887d9fd06fa73116f4440e565d42
parent83684b91a3c6b31419114b83fc22106146885fb6
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