facebookarchive / RakNet

RakNet is a cross platform, open source, C++ networking engine for game programmers.
Other
3.3k stars 1.02k forks source link

Build fails for Android: Enabling LIBCAT_SECURITY for Android builds fail - no pthread_cancel() #49

Closed larku closed 8 years ago

larku commented 9 years ago

I'm wanting to enable libCat security on Android but it fails to compile due to cat/src/threads/Threads.cpp calling pthread_cancel(..) in Threads::AbortThread().

My research suggests that Android/NDK does not support pthread_cancel(..)

Threads.cpp is included in RakNet/SecureHandshake.cpp

Is there a workaround for this?

I'm building using android-ndk-r10d-linux specifying android-9 as the platform target.

Solved: In case anyone else is having this issue, it's very simple to fix.

You just need to define CAT_NO_ENTROPY_THREAD in cat/Config.hpp.

This removed the thread call completely and building is successful!

larku commented 9 years ago

Anyone found a solution for this? If not what are you using to secure your connections?

larku commented 8 years ago

Solved: In case anyone else is having this issue, it's very simple to fix.

You just need to define CAT_NO_ENTROPY_THREAD in cat/Config.hpp.

This removed the thread call completely and building is successful!