correct pthread_rwlockattr getkind_np to setkind_np
parent
a39005253b
commit
34f8c3abb9
4
make.sh
4
make.sh
|
|
@ -155,9 +155,9 @@ done
|
||||||
|
|
||||||
if [ -n "$pthread_path" ]; then
|
if [ -n "$pthread_path" ]; then
|
||||||
LIBS="$LIBS -lpthread"
|
LIBS="$LIBS -lpthread"
|
||||||
line=$(nm $pthread_path | fgrep pthread_rwlockattr_getkind_np | fgrep -w T)
|
line=$(nm $pthread_path | fgrep pthread_rwlockattr_setkind_np | fgrep -w T)
|
||||||
if [ -n "$line" ]; then
|
if [ -n "$line" ]; then
|
||||||
CFLAGS="$CFLAGS -DWITH_PTHREAD_RWLOCKATTR_GETKIND_NP=1"
|
CFLAGS="$CFLAGS -DWITH_PTHREAD_RWLOCKATTR_SETKIND_NP=1"
|
||||||
fi
|
fi
|
||||||
elif [ -f /usr/lib/libc_r.so ]; then
|
elif [ -f /usr/lib/libc_r.so ]; then
|
||||||
line=$(nm -D /usr/lib/libc_r.so | grep pthread_create | grep -w T)
|
line=$(nm -D /usr/lib/libc_r.so | grep pthread_create | grep -w T)
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ int init_pthread_rwlock(pthread_rwlock_t *rwlock)
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
|
||||||
#ifdef WITH_PTHREAD_RWLOCKATTR_GETKIND_NP
|
#ifdef WITH_PTHREAD_RWLOCKATTR_SETKIND_NP
|
||||||
attr.ptr = &attr.holder;
|
attr.ptr = &attr.holder;
|
||||||
if ((result=pthread_rwlockattr_init(attr.ptr)) != 0) {
|
if ((result=pthread_rwlockattr_init(attr.ptr)) != 0) {
|
||||||
logError("file: "__FILE__", line: %d, "
|
logError("file: "__FILE__", line: %d, "
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue