The android libc, bionic, provides built-in support for pthreads, so no additional linking (-lpthreads) is necessary. It does not implement full POSIX threads functionality and leaves out support for read/write locks, pthread_cancel(), process-shared mutexes and condition variables as well as other more advanced features.
"pthread_mutexattr_setkind_np" is deprecated and a non portable function. You should replace this function by
int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
It should be staright forward since, both of these functions have the same signature.
See below link for more information
http://www.unix.com/man-page/FreeBSD/3/pthread_mutexattr_setkind_np/