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 authored and Vinnie Falco committed 2019-03-14 09:55:22 -07:00
1 parent fdfd666e23
commit 0033b7c1e4
2 files changed
+7 -1

No files matched your search

+1 -1
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