Bug 1090668 - Use elf.h instead of linux/elf.h when building with android API version >= 21. r=nfroyd
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 29 Oct 2014 13:37:00 +0900
changeset 212820 f7bcbc2534294cb583937cf3813e26646f08b74a
parent 212819 a1f1a255c06ce6f5b1ee7ddda2d0ecd2f0e1becc
child 212821 08f011fc1b47c4a97db89c507fe1ee9aeb9b24ec
push idunknown
push userunknown
push dateunknown
reviewersnfroyd
bugs1090668
milestone36.0a1
Bug 1090668 - Use elf.h instead of linux/elf.h when building with android API version >= 21. r=nfroyd
mozglue/linker/Elfxx.h
--- a/mozglue/linker/Elfxx.h
+++ b/mozglue/linker/Elfxx.h
@@ -2,19 +2,19 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef Elfxx_h
 #define Elfxx_h
 
 /**
  * Android system headers have two different elf.h file. The one under linux/
- * is the most complete.
+ * is the most complete on older android API versions.
  */
-#ifdef ANDROID
+#if defined(ANDROID) && __ANDROID_API__ < 21
 #include <linux/elf.h>
 #else
 #include <elf.h>
 #endif
 #include <endian.h>
 
 #if defined(__ARM_EABI__) && !defined(PT_ARM_EXIDX)
 #define PT_ARM_EXIDX 0x70000001