Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Mon, 21 May 2001 21:44:23 +0000 (21:44 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Mon, 21 May 2001 21:44:23 +0000 (21:44 +0000)
Log message:

Discovered while trying to compile-check the events branch on Solaris: on
some systems, s_addr is a *macro*.  It combines poorly with structures that
use that as an element name.

(pull-up from u2_10_11_alpha_events)

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@460 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
include/s_conf.h
ircd/s_conf.c

index 0f9331d15077a64da450091f1f8bbe27b98d6900..294e412f6030ec56d439929d3f1c2f59d81feb89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-05-21  Kevin L. Mitchell  <klmitch@mit.edu>
+
+       * ircd/s_conf.c: change "s_addr" element accesses to "address"
+       element accesses
+
+       * include/s_conf.h: on some systems, "s_addr" is a macro; use
+       "address" instead
+
 2001-05-07  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/m_settime.c: include ircd_snprintf.h
index b72ea17469e503cb9298ace19689b779985aec1d..23b929a86074e763da608277ac0290a248a468aa 100644 (file)
@@ -83,7 +83,7 @@ struct DenyConf {
   char*               hostmask;
   char*               message;
   char*               usermask;
-  unsigned int        s_addr;
+  unsigned int        address;
   unsigned int        flags;
   char                bits;        /* Number of bits for ipkills */
 };
index 865270d5aa336bc5ed894c857e03521839a91a6c..49f56494f8d1a8e88b07a68c390d8c3bede04641 100644 (file)
@@ -887,9 +887,9 @@ void conf_add_deny(const char* const* fields, int count, int ip_kill)
     /*
      * This ensures endian correctness
      */
-    conf->s_addr = inet_addr(ipname);
+    conf->address = inet_addr(ipname);
     Debug((DEBUG_DEBUG, "IPkill: %s = %08x/%i (%08x)", ipname,
-           conf->s_addr, conf->bits, NETMASK(conf->bits)));
+           conf->address, conf->bits, NETMASK(conf->bits)));
     conf->flags |= DENY_FLAGS_IP;
   }
   conf->next = denyConfList;
@@ -1420,8 +1420,8 @@ int find_kill(struct Client *cptr)
        break;
     } else if (deny->flags & DENY_FLAGS_IP) { /* k: by IP */
       Debug((DEBUG_DEBUG, "ip: %08x network: %08x/%i mask: %08x",
-             cli_ip(cptr).s_addr, deny->s_addr, deny->bits, NETMASK(deny->bits)));
-      if ((cli_ip(cptr).s_addr & NETMASK(deny->bits)) == deny->s_addr)
+             cli_ip(cptr).s_addr, deny->address, deny->bits, NETMASK(deny->bits)));
+      if ((cli_ip(cptr).s_addr & NETMASK(deny->bits)) == deny->address)
         break;
     }
     else if (0 == match(deny->hostmask, host))