Ticket #8815 (closed Bugs: fixed)

Opened 4 years ago

Last modified 4 years ago

Android - error: 'posix_memalign' was not declared in this scope

Reported by: mik01@… Owned by: andysem
Milestone: To Be Determined Component: log
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:


gcc.compile.c++ bin.v2/libs/log/build/gcc-arm/release/build-no/link-static/log-api-unix/threading-multi/threadsafe_queue.o
libs/log/src/threadsafe_queue.cpp: In static member function 'static void* boost::log::v2s_mt_posix::aux::threadsafe_queue_impl::operator new(std::size_t)':
libs/log/src/threadsafe_queue.cpp:175:36: error: 'posix_memalign' was not declared in this scope

It looks like posix_memalign ist not available for Android (using arm-linux-androideabi-gcc 4.6).

Possible fix (libs/log/src/threadsafe_queue.cpp):

// Solaris 10 does not have posix_memalign. Solaris 11 and later seem to have it.
// The same goes for Android.
#if !(defined(sun) || defined(__sun)) || defined(__SunOS_5_11) || defined(__SunOS_5_12)
#ifndef __ANDROID__


Change History

comment:1 Changed 4 years ago by andysem

  • Status changed from new to closed
  • Resolution set to fixed

(In [85020]) Refactored aligned memory allocation. Added support for Android. Fixes #8815.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.