system/core 64-bit cleanup.
This cleans up most of the size-related problems in system/core.
There are still a few changes needed for a clean 64-bit build,
but they look like they might require changes to things like the
fastboot protocol.
Change-Id: I1560425a289fa158e13e2e3173cc3e71976f92c0
diff --git a/services.c b/services.c
index 951048e..1c9db0d 100644
--- a/services.c
+++ b/services.c
@@ -86,7 +86,7 @@
{
char buf[100];
char value[PROPERTY_VALUE_MAX];
- int port = (int)cookie;
+ int port = (int) (uintptr_t) cookie;
if (port <= 0) {
snprintf(buf, sizeof(buf), "invalid port\n");
@@ -269,7 +269,7 @@
#if !ADB_HOST
static void subproc_waiter_service(int fd, void *cookie)
{
- pid_t pid = (pid_t)cookie;
+ pid_t pid = (pid_t) (uintptr_t) cookie;
D("entered. fd=%d of pid=%d\n", fd, pid);
for (;;) {
@@ -314,7 +314,7 @@
sti = malloc(sizeof(stinfo));
if(sti == 0) fatal("cannot allocate stinfo");
sti->func = subproc_waiter_service;
- sti->cookie = (void*)pid;
+ sti->cookie = (void*) (uintptr_t) pid;
sti->fd = ret_fd;
if(adb_thread_create( &t, service_bootstrap_func, sti)){
@@ -397,7 +397,7 @@
if (sscanf(name + 6, "%d", &port) == 0) {
port = 0;
}
- ret = create_service_thread(restart_tcp_service, (void *)port);
+ ret = create_service_thread(restart_tcp_service, (void *) (uintptr_t) port);
} else if(!strncmp(name, "usb:", 4)) {
ret = create_service_thread(restart_usb_service, NULL);
#endif