Merge "Fix x86 build, remove void* arithmetic."
diff --git a/libc/arch-arm/bionic/crtbegin.c b/libc/arch-arm/bionic/crtbegin.c
index cc58797..1bcb335 100644
--- a/libc/arch-arm/bionic/crtbegin.c
+++ b/libc/arch-arm/bionic/crtbegin.c
@@ -28,6 +28,7 @@
#include "../../bionic/libc_init_common.h"
#include <stddef.h>
+#include <stdint.h>
__attribute__ ((section (".preinit_array")))
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
@@ -44,7 +45,7 @@
array.init_array = &__INIT_ARRAY__;
array.fini_array = &__FINI_ARRAY__;
- void* raw_args = __builtin_frame_address(0) + sizeof(void*);
+ void* raw_args = (void*) ((uintptr_t) __builtin_frame_address(0) + sizeof(void*));
__libc_init(raw_args, NULL, &main, &array);
}
diff --git a/libc/arch-x86/bionic/crtbegin.c b/libc/arch-x86/bionic/crtbegin.c
index 63e58a6..43e9306 100755
--- a/libc/arch-x86/bionic/crtbegin.c
+++ b/libc/arch-x86/bionic/crtbegin.c
@@ -28,6 +28,7 @@
#include "../../bionic/libc_init_common.h"
#include <stddef.h>
+#include <stdint.h>
__attribute__ ((section (".preinit_array")))
void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
@@ -46,7 +47,7 @@
array.init_array = &__INIT_ARRAY__;
array.fini_array = &__FINI_ARRAY__;
- void* raw_args = __builtin_frame_address(0) + sizeof(void*);
+ void* raw_args = (void*) ((uintptr_t) __builtin_frame_address(0) + sizeof(void*));
__libc_init(raw_args, NULL, &main, &array);
}
diff --git a/linker/arch/x86/begin.c b/linker/arch/x86/begin.c
index cdc98e0..051a16a 100755
--- a/linker/arch/x86/begin.c
+++ b/linker/arch/x86/begin.c
@@ -26,6 +26,7 @@
* SUCH DAMAGE.
*/
+#include <stdint.h>
#include <sys/cdefs.h>
extern unsigned __linker_init(void* raw_args);