summaryrefslogtreecommitdiff
path: root/usr.sbin/sendmail/src/daemon.c
diff options
context:
space:
mode:
authorglass <glass@NetBSD.org>1993-07-20 18:10:14 +0000
committerglass <glass@NetBSD.org>1993-07-20 18:10:14 +0000
commitf2a0b0fbdfaab79400df65d1d67a7907cd444fcd (patch)
tree91d3b9b68c90ea6f29e5c35c89279b2a3155d66a /usr.sbin/sendmail/src/daemon.c
parent9d232f6caedf55736719cf3417d56f907bf9c5ee (diff)
Upgraded sendmail from revision 8.1C to 8.3;
this version of sendmail tries to use sysconf() if the _SC_* macros are defined in unistd.h. We have the macros but not the function. A temporary "fix" has been made to avoid the issue.
Diffstat (limited to 'usr.sbin/sendmail/src/daemon.c')
-rw-r--r--usr.sbin/sendmail/src/daemon.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/usr.sbin/sendmail/src/daemon.c b/usr.sbin/sendmail/src/daemon.c
index becb2b85348..cfbfec6b18e 100644
--- a/usr.sbin/sendmail/src/daemon.c
+++ b/usr.sbin/sendmail/src/daemon.c
@@ -38,9 +38,9 @@
#ifndef lint
#ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/7/93 (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.2 (Berkeley) 7/13/93 (with daemon mode)";
#else
-static char sccsid[] = "@(#)daemon.c 8.1 (Berkeley) 6/7/93 (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.2 (Berkeley) 7/13/93 (without daemon mode)";
#endif
#endif /* not lint */
@@ -131,7 +131,11 @@ getrequests()
syserr("554 service \"smtp\" unknown");
goto severe;
}
+#ifdef _SCO_unix_
+ DaemonAddr.sin.sin_port = htons(sp->s_port);
+#else
DaemonAddr.sin.sin_port = sp->s_port;
+#endif
}
/*
@@ -439,7 +443,13 @@ setdaemonoptions(p)
if (sp == NULL)
syserr("554 service \"%s\" unknown", v);
else
+ {
+#ifdef _SCO_unix_
+ DaemonAddr.sin.sin_port = htons(sp->s_port);
+#else
DaemonAddr.sin.sin_port = sp->s_port;
+#endif
+ }
}
break;
#endif
@@ -606,7 +616,11 @@ gothostent:
syserr("554 makeconnection: service \"smtp\" unknown");
return (EX_OSERR);
}
+#ifdef _SCO_unix_
+ port = htons(sp->s_port);
+#else
port = sp->s_port;
+#endif
}
switch (addr.sa.sa_family)
@@ -861,7 +875,13 @@ getauthinfo(fd)
/* create foreign address */
sp = getservbyname("auth", "tcp");
if (sp != NULL)
+ {
+#ifdef _SCO_unix_
+ fa.sin.sin_port = htons(sp->s_port);
+#else
fa.sin.sin_port = sp->s_port;
+#endif
+ }
else
fa.sin.sin_port = htons(113);