diff --git a/make.sh b/make.sh index a145c0b..eb9e2e4 100755 --- a/make.sh +++ b/make.sh @@ -155,9 +155,9 @@ done if [ -n "$pthread_path" ]; then 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 - CFLAGS="$CFLAGS -DWITH_PTHREAD_RWLOCKATTR_GETKIND_NP=1" + CFLAGS="$CFLAGS -DWITH_PTHREAD_RWLOCKATTR_SETKIND_NP=1" fi elif [ -f /usr/lib/libc_r.so ]; then line=$(nm -D /usr/lib/libc_r.so | grep pthread_create | grep -w T) diff --git a/src/pthread_func.c b/src/pthread_func.c index 864aa93..0b057f6 100644 --- a/src/pthread_func.c +++ b/src/pthread_func.c @@ -80,7 +80,7 @@ int init_pthread_rwlock(pthread_rwlock_t *rwlock) int result; -#ifdef WITH_PTHREAD_RWLOCKATTR_GETKIND_NP +#ifdef WITH_PTHREAD_RWLOCKATTR_SETKIND_NP attr.ptr = &attr.holder; if ((result=pthread_rwlockattr_init(attr.ptr)) != 0) { logError("file: "__FILE__", line: %d, "