aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2005-11-13 17:30:30 +0800
committerdinoex <dinoex@FreeBSD.org>2005-11-13 17:30:30 +0800
commit6c9072e3975a2068084ce6088f68b9ce00e5ec34 (patch)
treecddad538730f38281f094b6eea8938334d8c230b /www
parent20ae5d21784290841c477193a9c33b1732557dd5 (diff)
downloadfreebsd-ports-gnome-6c9072e3975a2068084ce6088f68b9ce00e5ec34.tar.gz
freebsd-ports-gnome-6c9072e3975a2068084ce6088f68b9ce00e5ec34.tar.zst
freebsd-ports-gnome-6c9072e3975a2068084ce6088f68b9ce00e5ec34.zip
- fix build with APACHE1.3 IPV6
Diffstat (limited to 'www')
-rw-r--r--www/mod_ruby/files/patch-connection.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/www/mod_ruby/files/patch-connection.c b/www/mod_ruby/files/patch-connection.c
new file mode 100644
index 000000000000..88905bd70ef1
--- /dev/null
+++ b/www/mod_ruby/files/patch-connection.c
@@ -0,0 +1,27 @@
+--- connection.c.orig Fri Jul 16 11:16:29 2004
++++ connection.c Fri Sep 9 06:38:14 2005
+@@ -100,8 +100,12 @@
+ #ifdef APACHE2
+ return INT2NUM(conn->local_addr->port);
+ #else
++#ifdef APACHE6
++ return INT2NUM(ntohs(((struct sockaddr_in *)&conn->local_addr)->sin_port));
++#else
+ return INT2NUM(ntohs(conn->local_addr.sin_port));
+ #endif
++#endif
+ }
+
+ static VALUE connection_remote_port(VALUE self)
+@@ -112,7 +116,11 @@
+ #ifdef APACHE2
+ return INT2NUM(conn->remote_addr->port);
+ #else
++#ifdef APACHE6
++ return INT2NUM(ntohs(((struct sockaddr_in *)&conn->remote_addr)->sin_port));
++#else
+ return INT2NUM(ntohs(conn->remote_addr.sin_port));
++#endif
+ #endif
+ }
+