Building for older Android #112

Closed
opened 2026-01-29 20:35:23 +00:00 by claunia · 1 comment
Owner

Originally created by @mikir on GitHub (May 24, 2016).

Method log2 is not available on Android before API 18, so fast_log.h is not compilable for older Android.

The suggestion is to update the row

#if defined(_MSC_VER) && _MSC_VER <= 1700
  // Visual Studio 2012 does not have the log2() function defined, so we use
  // log() and a multiplication instead.

to

#if (defined(__ANDROID_API__) && __ANDROID_API__ <= 17) || (defined(_MSC_VER) && _MSC_VER <= 1700)
  // Old Android API 17 and old Visual Studio 2012 do not have the log2() function defined, so we use
  // log() and a multiplication instead.
Originally created by @mikir on GitHub (May 24, 2016). Method log2 is not available on Android before API 18, so fast_log.h is not compilable for older Android. The suggestion is to update the row ``` #if defined(_MSC_VER) && _MSC_VER <= 1700 // Visual Studio 2012 does not have the log2() function defined, so we use // log() and a multiplication instead. ``` to ``` #if (defined(__ANDROID_API__) && __ANDROID_API__ <= 17) || (defined(_MSC_VER) && _MSC_VER <= 1700) // Old Android API 17 and old Visual Studio 2012 do not have the log2() function defined, so we use // log() and a multiplication instead. ```
Author
Owner

@eustas commented on GitHub (Jun 16, 2016):

Fixed in v0.5

@eustas commented on GitHub (Jun 16, 2016): Fixed in v0.5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#112