You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when cross compiling zerotier using ndk toolchain (for android)
it satisfied #if defined(__LINUX__) && ( (!defined(__GLIBC__)) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 18)) ) on line 2097 and called pthread_setattr_default_np which is not supported in ndk
one.cpp:2097:2: error: use of undeclared identifier 'pthread_setattr_default_np'
pthread_setattr_default_np(&tattr);
^
1 warning and 1 error generated.
make: *** [<builtin>: one.o] Error 1
make: *** Waiting for unfinished jobs....
to reproduce
make ZT_STATIC=1 ZT_DEBUG=0 ZT_SSO_SUPPORTED=0 CC=aarch64-linux-android33-clang CXX=aarch64-linux-android33-clang++ LDFLAGS="-s -L../deps/aarch64" DEFS="-I../deps/include" ( in ubuntu with ndk toolchain, LDFLAGS and DEFS are set to link the natpmpc library built myself )
or make ZT_STATIC=1 ZT_DEBUG=0 ZT_SSO_SUPPORTED=0 ( in termux after installing natpmpc apt-get install -y natpmpc )
problem
when cross compiling zerotier using ndk toolchain (for android)
it satisfied
#if defined(__LINUX__) && ( (!defined(__GLIBC__)) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 18)) )
on line 2097 and calledpthread_setattr_default_np
which is not supported in ndkto reproduce
make ZT_STATIC=1 ZT_DEBUG=0 ZT_SSO_SUPPORTED=0 CC=aarch64-linux-android33-clang CXX=aarch64-linux-android33-clang++ LDFLAGS="-s -L../deps/aarch64" DEFS="-I../deps/include"
( in ubuntu with ndk toolchain, LDFLAGS and DEFS are set to link the natpmpc library built myself )or
make ZT_STATIC=1 ZT_DEBUG=0 ZT_SSO_SUPPORTED=0
( in termux after installing natpmpcapt-get install -y natpmpc
)possible solution
change that line into
#if defined(__LINUX__) && ( (!defined(__GLIBC__)) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 18)) ) && (!defined(__ANDROID__))
The text was updated successfully, but these errors were encountered: