Fix bug in $w and $=w setup
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 25 Feb 1983 10:54:21 +0000 (02:54 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Fri, 25 Feb 1983 10:54:21 +0000 (02:54 -0800)
SCCS-mr: usr.sbin/sendmail/src/daemon.c 162
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 3.50

usr/src/usr.sbin/sendmail/src/daemon.c

index 680f145..6b780b0 100644 (file)
@@ -3,7 +3,7 @@
 # include <sys/mx.h>
 
 #ifndef DAEMON
 # include <sys/mx.h>
 
 #ifndef DAEMON
-SCCSID(@(#)daemon.c    3.49            %G%     (w/o daemon mode));
+SCCSID(@(#)daemon.c    3.50            %G%     (w/o daemon mode));
 #else
 
 #include <sys/socket.h>
 #else
 
 #include <sys/socket.h>
@@ -11,7 +11,7 @@ SCCSID(@(#)daemon.c   3.49            %G%     (w/o daemon mode));
 #include <netdb.h>
 #include <wait.h>
 
 #include <netdb.h>
 #include <wait.h>
 
-SCCSID(@(#)daemon.c    3.49            %G%     (with daemon mode));
+SCCSID(@(#)daemon.c    3.50            %G%     (with daemon mode));
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
@@ -305,8 +305,9 @@ myhostname(hostbuf)
 {
        extern struct hostent *gethostbyname();
        struct hostent *hp;
 {
        extern struct hostent *gethostbyname();
        struct hostent *hp;
+       auto int i = 30;
 
 
-       gethostname(hostbuf, sizeof hostbuf);
+       gethostname(hostbuf, &i);
        hp = gethostbyname(hostbuf);
        if (hp != NULL)
                return (hp->h_aliases);
        hp = gethostbyname(hostbuf);
        if (hp != NULL)
                return (hp->h_aliases);