From 2cae07aa5214a6764705b0f553c95a99f7032b71 Mon Sep 17 00:00:00 2001 From: "roberto@solrisexpress" Date: Mon, 3 Oct 2011 09:37:32 +0000 Subject: [PATCH] fixed 64bit compilation --- event.c | 10 +++++----- master_utils.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/event.c b/event.c index 4e7be2c4..d14034eb 100644 --- a/event.c +++ b/event.c @@ -81,7 +81,7 @@ void *event_queue_alloc(int nevents) { int event_queue_interesting_fd(void *events, int id) { port_event_t *pe = (port_event_t *) events; if (pe[id].portev_source == PORT_SOURCE_FILE || pe[id].portev_source == PORT_SOURCE_TIMER) { - return (int) pe[id].portev_user; + return (long) pe[id].portev_user; } return (int) pe[id].portev_object; @@ -149,7 +149,7 @@ int event_queue_wait(int eq, int timeout, int *interesting_fd) { if (pe.portev_source == PORT_SOURCE_FILE || pe.portev_source == PORT_SOURCE_TIMER) { - *interesting_fd = (int) pe.portev_user; + *interesting_fd = (long) pe.portev_user; } else { *interesting_fd = (int) pe.portev_object; @@ -476,7 +476,7 @@ int event_queue_add_file_monitor(int eq, char *filename, int *id) { fo.fo_ctime = st.st_ctim; fmon_id++; - if (port_associate(eq, PORT_SOURCE_FILE, (uintptr_t) &fo, FILE_MODIFIED|FILE_ATTRIB, (void *) fmon_id)) { + if (port_associate(eq, PORT_SOURCE_FILE, (uintptr_t) &fo, FILE_MODIFIED|FILE_ATTRIB, (void *) (long) fmon_id)) { uwsgi_error("port_associate()"); return -1; } @@ -506,7 +506,7 @@ struct uwsgi_fmon *event_queue_ack_file_monitor(int eq, int id) { fo.fo_atime = st.st_atim; fo.fo_mtime = st.st_mtim; fo.fo_ctime = st.st_ctim; - if (port_associate(eq, PORT_SOURCE_FILE, (uintptr_t) &fo, FILE_MODIFIED|FILE_ATTRIB, (void *)id)) { + if (port_associate(eq, PORT_SOURCE_FILE, (uintptr_t) &fo, FILE_MODIFIED|FILE_ATTRIB, (void *)(long)id)) { uwsgi_error("port_associate()"); return NULL; } @@ -773,7 +773,7 @@ int event_queue_add_timer(int eq, int *id, int sec) { timer_id++; pnotif.portnfy_port = eq; - pnotif.portnfy_user = (void *) timer_id; + pnotif.portnfy_user = (void *) (long) timer_id; sigev.sigev_notify = SIGEV_PORT; sigev.sigev_value.sival_ptr = &pnotif; diff --git a/master_utils.c b/master_utils.c index a776e597..daee9b03 100644 --- a/master_utils.c +++ b/master_utils.c @@ -308,7 +308,7 @@ void uwsgi_send_stats(int fd) { fprintf(output,"\t{"); fprintf(output,"\"id\": %d, ", uwsgi.workers[i+1].id); - fprintf(output,"\"pid\": %d, ", uwsgi.workers[i+1].pid); + fprintf(output,"\"pid\": %d, ", (int) uwsgi.workers[i+1].pid); stats_send_llu("\"requests\": %llu, ", uwsgi.workers[i+1].requests); stats_send_llu("\"exceptions\": %llu, ", uwsgi.workers[i+1].exceptions);