On Wed, 10 Mar 2010, Ozgur Kazancci wrote:
> Any ideas for "structure has no member named `sin_addr'" error?
Can you try the following patch?
cheers,
David
--- mod_throttle.c.orig Sun Dec 3 11:15:10 2000
+++ mod_throttle.c Wed Mar 10 16:52:55 2010
@@ -719,7 +719,7 @@
#include <sys/ipc.h>
#include <sys/sem.h>
-#if (defined(__GNU_LIBRARY__) && (!defined(_SEM_SEMUN_UNDEFINED))) ||
defined(__FreeBSD__) || defined(__NetBSD__)
+#if (defined(__GNU_LIBRARY__) && (!defined(_SEM_SEMUN_UNDEFINED))) ||
defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
/* union semun is defined by including <sys/sem.h> */
#else
/* X/OPEN says we have to define it ourselves (twits). */
@@ -2811,7 +2811,7 @@
* which we will apply the global policy for client connections.
*/
client_ip_config.track = (t_throttle *) get_client_ip(
- client_ip_pool, r->connection->remote_addr.sin_addr
+ client_ip_pool, ((struct sockaddr_in
*)&r->connection->remote_addr)->sin_addr
);
/* Is it time for the period adjustment? */
@@ -3185,7 +3185,7 @@
(void) critical_acquire(critical);
#ifdef THROTTLE_CLIENT_IP
- client_ip = get_client_ip(client_ip_pool,
r->connection->remote_addr.sin_addr);
+ client_ip = get_client_ip(client_ip_pool, ((struct sockaddr_in
*)&r->connection->remote_addr)->sin_addr);
#endif
#ifdef THROTTLE_REMOTE_USER
remote_user = get_remote_user(remote_user_pool, r->connection->user);