From ae3ac9012d6646eff4cffdb1bda0585e54883f56 Mon Sep 17 00:00:00 2001 From: stskeeps Date: Fri, 13 Jul 2001 12:10:43 +0000 Subject: [PATCH] . --- autoconf/configure.in | 2 +- configure | 10 +++++----- include/common.h | 2 +- include/inet.h | 2 +- src/ircd.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/autoconf/configure.in b/autoconf/configure.in index 1b94dd26b..68e79ef14 100644 --- a/autoconf/configure.in +++ b/autoconf/configure.in @@ -10,7 +10,7 @@ dnl Checks for libraries. AC_CHECK_LIB(descrypt, crypt, IRCDLIBS="$IRCDLIBS-ldescrypt " MKPASSWDLIBS="-ldescrypt", AC_CHECK_LIB(crypt, crypt,IRCDLIBS="$IRCDLIBS-lcrypt " MKPASSWDLIBS="-lcrypt")) AC_CHECK_LIB(socket, socket,IRCDLIBS="$IRCDLIBS-lsocket ") -AC_CHECK_LIB(nsl, socket,IRCDLIBS="$IRCDLIBS-lnsl ") +AC_CHECK_LIB(nsl, inet_ntoa,IRCDLIBS="$IRCDLIBS-lnsl ") AC_SUBST(IRCDLIBS) AC_SUBST(MKPASSWDLIBS) diff --git a/configure b/configure index a58dbb6d3..0e2017fb2 100755 --- a/configure +++ b/configure @@ -1046,9 +1046,9 @@ else echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for socket in -lnsl""... $ac_c" 1>&6 -echo "configure:1051: checking for socket in -lnsl" >&5 -ac_lib_var=`echo nsl'_'socket | sed 'y%./+-%__p_%'` +echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6 +echo "configure:1051: checking for inet_ntoa in -lnsl" >&5 +ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1060,10 +1060,10 @@ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then diff --git a/include/common.h b/include/common.h index d4e9ba758..5d52ddbf3 100644 --- a/include/common.h +++ b/include/common.h @@ -37,7 +37,7 @@ #ifdef PARAMH #include #endif -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) || defined(_SOLARIS) #include "sys.h" #endif diff --git a/include/inet.h b/include/inet.h index fc01274c1..ea11c64bc 100644 --- a/include/inet.h +++ b/include/inet.h @@ -33,7 +33,7 @@ #ifdef __STDC__ # ifndef _WIN32 extern __u_l inet_addr(char *); -extern char *inet_ntoa(char *); +extern char *inet_ntoa(struct IN_ADDR); # endif extern __u_l inet_makeaddr(int, int); extern __u_l inet_network(char *); diff --git a/src/ircd.c b/src/ircd.c index 5c2175c88..e8de4e6cc 100644 --- a/src/ircd.c +++ b/src/ircd.c @@ -1123,7 +1123,7 @@ int InitwIRCD(argc, argv) opermotd = (aMotd *) read_file(OPATH, &opermotd); motd = (aMotd *) read_motd(MPATH); svsmotd = (aMotd *) read_file(VPATH, &svsmotd); - strcpy(me.sockhost, conf_listen->ip, sizeof(me.sockhost) - 1); + strncpy(me.sockhost, conf_listen->ip, sizeof(me.sockhost) - 1); if (me.name[0] == '\0') strncpyzt(me.name, me.sockhost, sizeof(me.name)); me.hopcount = 0;