Open feimaomiaomiao opened 1 year ago
should be in #include
@micheleselea it is included: https://github.com/pocoproject/poco/blob/2a6434a86d9fcf3f41e8d442832051cf3ff6263b/Foundation/include/Poco/Thread_POSIX.h#L28
@feimaomiaomiao you should provide more information; which version of POCO are you using?
possibly you should use prctl(PR_GET_NAME)
@aleks-f my preview answer was not a suggestion, I was pinting out that the include already is present in file so I can't understand the compile error about pthread_getname_np
In file included from src/Thread.cpp:32: src/Thread_POSIX.cpp:94:7: error: use of undeclared identifier 'pthread_getname_np' if (pthread_getname_np(pthread_self(), name, POCO_MAX_TH... ^ 1 error generated. make[1]: *** [/home/xia/office/poco-android/build/rules/compile:44:/home/xia/office/poco-android/Foundation/obj/Android/armeabi-v7a/debug_static/Thread.o] error 1