From 2ddf2e507fe32f3cf9cd3aa36e6c9eeb91bdeee7 Mon Sep 17 00:00:00 2001 From: "roberto@roberto.homenet.telecomitalia.it" Date: Sat, 29 Aug 2009 12:00:47 +0200 Subject: [PATCH] fix for 64 bit --- apache2/mod_uwsgi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apache2/mod_uwsgi.c b/apache2/mod_uwsgi.c index b01c1c7e..50bd5947 100644 --- a/apache2/mod_uwsgi.c +++ b/apache2/mod_uwsgi.c @@ -23,7 +23,9 @@ To compile: (Linux) apxs2 -i -c mod_uwsgi.c (OSX) - sudo apxs -i -c mod_uwsgi.c + sudo apxs -i -a -c mod_uwsgi.c +(OSX 64bit) + sudo apxs -i -a -c -Wc,'-arch x86_64' -Wl,'-arch x86_64' mod_uwsgi.c Configure: @@ -37,8 +39,9 @@ LoadModule uwsgi_module /mod_uwsgi.so #include "apr_strings.h" #include "httpd.h" -#include "http_log.h" +#include "http_core.h" #include "http_config.h" +#include "http_log.h" #include #include @@ -144,6 +147,7 @@ static int uwsgi_handler(request_rec *r) { return HTTP_INTERNAL_SERVER_ERROR; } + if (connect(uwsgi_poll.fd, (struct sockaddr *) &c->s_addr, c->addr_size ) < 0) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "uwsgi: connect to socket failed: %s", strerror(errno)); @@ -171,6 +175,7 @@ static int uwsgi_handler(request_rec *r) { } } + vecptr = uwsgi_add_var(uwsgi_vars, vecptr, "REQUEST_METHOD", (char *) r->method, &pkt_size) ; vecptr = uwsgi_add_var(uwsgi_vars, vecptr, "QUERY_STRING", r->args ? r->args : "", &pkt_size) ;