]> jfr.im git - solanum.git/blobdiff - src/reslib.c
modlist: Fix address display on 64-bit systems.
[solanum.git] / src / reslib.c
index d2b029cfd308ae74022d0a141856eae495858371..a4bdcd6689a29d637507139c3518f48194f67558 100644 (file)
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
  * 4. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
@@ -86,8 +82,8 @@
 #include "ircd.h"
 #include "res.h"
 #include "reslib.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
+#include "logger.h"
 
 #define NS_TYPE_ELT             0x40 /* EDNS0 extended label type */
 #define DNS_LABELTYPE_BITSTRING 0x41
@@ -96,9 +92,9 @@
 /* $Id: reslib.c 1695 2006-06-27 15:11:23Z jilles $ */
 /* from Hybrid Id: reslib.c 177 2005-10-22 09:05:05Z michael $ */
 
-struct irc_sockaddr_storage irc_nsaddr_list[IRCD_MAXNS];
+struct rb_sockaddr_storage irc_nsaddr_list[IRCD_MAXNS];
 int irc_nscount = 0;
-char irc_domain[HOSTLEN + 1];
+char irc_domain[IRCD_RES_HOSTLEN + 1];
 
 static const char digitvalue[256] = {
   -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, /*16*/
@@ -209,7 +205,7 @@ parse_resvconf(void)
       *p = '\0';  /* take the first word */
 
     if (irccmp(opt, "domain") == 0)
-      strlcpy(irc_domain, arg, sizeof(irc_domain));
+      rb_strlcpy(irc_domain, arg, sizeof(irc_domain));
     else if (irccmp(opt, "nameserver") == 0)
       add_nameserver(arg);
   }
@@ -409,7 +405,7 @@ irc_ns_name_ntop(const char *src, char *dst, size_t dstsiz)
                        }
                        *dn++ = '.';
                }
-               if ((l = labellen((unsigned char*)(cp - 1))) < 0) {
+               if ((l = labellen((const unsigned char*)(cp - 1))) < 0) {
                        errno = EMSGSIZE; /* XXX */
                        return(-1);
                }