diff options
author | Johnny Willemsen <jwillemsen@users.noreply.github.com> | 2016-08-10 13:46:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 13:46:06 +0200 |
commit | a87c34eaeeace4dc6d47849f769a379aa5b45f9f (patch) | |
tree | 8bdc0f625fc2bff23bd39e3caaf6c02bc3e8c9b2 | |
parent | 0e6f19766a575fa98b3bfe40f1ed29a8cd80b55a (diff) | |
parent | 72485ec324e2c11a24ec679e8269c38122e323fc (diff) | |
download | ATCD-a87c34eaeeace4dc6d47849f769a379aa5b45f9f.tar.gz |
Merge pull request #280 from dlifshitz-maca/BZ-4217_01
BZ-4217 Android 6 with 3rd party AIO not working
-rw-r--r-- | ACE/ace/POSIX_Proactor.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ACE/ace/POSIX_Proactor.cpp b/ACE/ace/POSIX_Proactor.cpp index 4d5105ae03e..0d7f3231b10 100644 --- a/ACE/ace/POSIX_Proactor.cpp +++ b/ACE/ace/POSIX_Proactor.cpp @@ -920,6 +920,12 @@ int ACE_POSIX_AIOCB_Proactor::delete_result_aiocb_list (void) void ACE_POSIX_AIOCB_Proactor::check_max_aio_num () { +#if !defined (ACE_ANDROID) + // Android API 23 introduced a define _POSIX_AIO_MAX 1 which gets used by _SC_AIO_MAX. + // Previously, without the define, the value returned was -1, which got ignored. + // Officially, the Android OS does not support AIO so if ACE_HAS_AIO_CALLS is defined + // then a 3rd party library must be in use and this check is invalid. + long max_os_aio_num = ACE_OS::sysconf (_SC_AIO_MAX); // Define max limit AIO's for concrete OS @@ -929,6 +935,7 @@ void ACE_POSIX_AIOCB_Proactor::check_max_aio_num () if (max_os_aio_num > 0 && aiocb_list_max_size_ > (unsigned long) max_os_aio_num) aiocb_list_max_size_ = max_os_aio_num; +#endif #if defined (HPUX) || defined (__FreeBSD__) // Although HPUX 11.00 allows to start 2048 AIO's for all process in |