electronicarts / EASTL

EASTL stands for Electronic Arts Standard Template Library. It is an extensive and robust implementation that has an emphasis on high performance.
BSD 3-Clause "New" or "Revised" License
8.09k stars 929 forks source link

Tests fail to compile: error: use of undeclared identifier 'pthread_attr_get_np' #517

Open yurivict opened 1 year ago

yurivict commented 1 year ago
In file included from /usr/ports/devel/eastl/work/EASTL-3.21.12/test/packages/EAThread/source/eathread_callstack.cpp:33:
/usr/ports/devel/eastl/work/EASTL-3.21.12/test/packages/EAThread/source/unix/eathread_pthread_stack_info.cpp:96:18: error: use of undeclared identifier 'pthread_attr_get_np'; did you mean 'pthread_attr_getscope'?
                                int result = pthread_attr_get_np(pthread_self(), &attr); // __BSD__ or __FreeBSD__
                                             ^~~~~~~~~~~~~~~~~~~
                                             pthread_attr_getscope
/usr/include/pthread.h:333:6: note: 'pthread_attr_getscope' declared here
int             pthread_attr_getscope(const pthread_attr_t * __restrict,
                ^
In file included from /usr/ports/devel/eastl/work/EASTL-3.21.12/test/packages/EAThread/source/eathread_callstack.cpp:33:
/usr/ports/devel/eastl/work/EASTL-3.21.12/test/packages/EAThread/source/unix/eathread_pthread_stack_info.cpp:96:38: error: cannot initialize a parameter of type 'const pthread_attr_t *' (aka 'pthread_attr *const *') with an rvalue of type 'pthread_t' (aka 'pthread *')
                                int result = pthread_attr_get_np(pthread_self(), &attr); // __BSD__ or __FreeBSD__
                                                                 ^~~~~~~~~~~~~~
/usr/include/pthread.h:333:61: note: passing argument to parameter here
int             pthread_attr_getscope(const pthread_attr_t * __restrict,
                                                                       ^
2 errors generated.

This module needs #include <pthread_np.h>.

Version: 3.21.12 FreeBSD 13.2