From 1e860ab7289ec6c2314c53a8b88b69a75b9d25b8 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 29 Mar 2000 18:58:20 +0000 Subject: Ultrix 4.5 port changes. svn path=/trunk/; revision=2841 --- fetchmail.c | 6 ++++++ xmalloc.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/fetchmail.c b/fetchmail.c index 0deb0598..76580ca2 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -38,6 +38,7 @@ #include #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 */ -- cgit v1.2.3