Bug 1428182 - 3. Only include <linux/elf.h> for non-unified headers; r=glandium draft
authorJim Chen <nchen@mozilla.com>
Mon, 29 Jan 2018 17:38:13 -0500
changeset 748491 43b3fa15042246d2c3ec37a3ca904822b0f68d0c
parent 748490 147e4be9eb98326fd4946b7b3695c573c7108347
child 748492 e029eec173f00d2d9afb810f18767beebd485d6d
push id97189
push userbmo:nchen@mozilla.com
push dateMon, 29 Jan 2018 22:39:03 +0000
reviewersglandium
bugs1428182
milestone60.0a1
Bug 1428182 - 3. Only include <linux/elf.h> for non-unified headers; r=glandium Unified headers have a complete <elf.h> so we should include that instead of <linux/elf.h>. MozReview-Commit-ID: DkQv2vk1Q62
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 on older android API versions.
+ * is the most complete on older Android API versions without unified headers.
  */
-#if defined(ANDROID) && __ANDROID_API__ < 21
+#if defined(ANDROID) && __ANDROID_API__ < 21 && !defined(__ANDROID_API_L__)
 #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