aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-03-29 18:58:20 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-03-29 18:58:20 +0000
commit1e860ab7289ec6c2314c53a8b88b69a75b9d25b8 (patch)
tree93298cbf2d5f8ff261af563102328855f57914b8
parent5e3493241e91fb0a31dd46669d4dfb5bb3b70332 (diff)
downloadfetchmail-1e860ab7289ec6c2314c53a8b88b69a75b9d25b8.tar.gz
fetchmail-1e860ab7289ec6c2314c53a8b88b69a75b9d25b8.tar.bz2
fetchmail-1e860ab7289ec6c2314c53a8b88b69a75b9d25b8.zip
Ultrix 4.5 port changes.
svn path=/trunk/; revision=2841
-rw-r--r--fetchmail.c6
-rw-r--r--xmalloc.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 0deb0598..76580ca2 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -38,6 +38,7 @@
#include <hesiod.h>
#endif
+#include "getopt.h"
#include "fetchmail.h"
#include "tunable.h"
#include "smtp.h"
@@ -236,7 +237,12 @@ int main(int argc, char **argv)
/* logging should be set up early in case we were restarted from exec */
if (run.use_syslog)
{
+#if defined(LOG_MAIL)
openlog(program_name, LOG_PID, LOG_MAIL);
+#else
+ /* Assume BSD4.2 openlog with two arguments */
+ openlog(program_name, LOG_PID);
+#endif
report_init(-1);
}
else
diff --git a/xmalloc.c b/xmalloc.c
index 2b343fe4..4cd9d40e 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -57,4 +57,14 @@ char *xstrdup(const char *s)
return p;
}
+#if !defined(HAVE_STRDUP)
+char *strdup(const char *s)
+{
+ char *p;
+ p = (char *) malloc(strlen(s)+1);
+ strcpy(p,s);
+ return p;
+}
+#endif /* !HAVE_STRDUP */
+
/* xmalloc.c ends here */