Android: Use compiler pre-defined __ANDROID__

The ANDROID define us usually originationg from he build system
(like CMake, ndk-build, etc.). But some buildsystems like Bazel
do not set it which brakes Android platform detection.

Better use __ANDROID__ (like boost predef does) which is
predefined by the compiler if targeting Android.
This commit is contained in:
Gregor Jasny
2019-03-14 15:46:43 +01:00
committed by Vinnie Falco
parent fdfd666e23
commit 0033b7c1e4
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Version 233:
* Check __ANDROID__ instead
--------------------------------------------------------------------------------
Version 232:
* Fix close_socket for net::basic_socket changes

View File

@ -24,7 +24,7 @@
#include <limits.h>
#if ! defined(BOOST_BEAST_NO_POSIX_FADVISE)
# if defined(__APPLE__) || (defined(ANDROID) && (__ANDROID_API__ < 21))
# if defined(__APPLE__) || (defined(__ANDROID__) && (__ANDROID_API__ < 21))
# define BOOST_BEAST_NO_POSIX_FADVISE
# endif
#endif