diff options
-rw-r--r-- | fetchmail.c | 6 | ||||
-rw-r--r-- | xmalloc.c | 10 |
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 @@ -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 */ |