Maybe the definition of pthread_t on android is different from other platforms.
You should not take pthread_t as Array type.
BTW, why did you modify this code?