diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-11-26 14:52:42 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-03 23:11:34 -0400 |
commit | af68a4db08b70d5f4c918fbe0a871159daf72e6b (patch) | |
tree | 07ed381d551bb2e34c63aca07b7bd66544ff6592 /src | |
parent | 764fc18daa80ce66ffdb11e50357be7de37af038 (diff) | |
download | lighttpd-git-af68a4db08b70d5f4c918fbe0a871159daf72e6b.tar.gz |
[multiple] _WIN32 protect code w/ HAVE_SYSLOG_H
Diffstat (limited to 'src')
-rw-r--r-- | src/configfile.c | 4 | ||||
-rw-r--r-- | src/log.c | 2 | ||||
-rw-r--r-- | src/mod_accesslog.c | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/configfile.c b/src/configfile.c index 8fbbe4d8..ec520ea8 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -1682,6 +1682,10 @@ static void config_log_error_open_syslog(server *srv, log_error_st *errh, const } } openlog("lighttpd", LOG_CONS|LOG_PID, -1==facility ? LOG_DAEMON : facility); + #else + UNUSED(srv); + UNUSED(errh); + UNUSED(syslog_facility); #endif } @@ -242,7 +242,9 @@ log_error_write (const log_error_st * const errh, buffer * const restrict b) write_all(errh->fd, BUF_PTR_LEN(b)); } else { + #ifdef HAVE_SYSLOG_H syslog(LOG_ERR, "%s", b->ptr); + #endif } } diff --git a/src/mod_accesslog.c b/src/mod_accesslog.c index 7c915803..77b69b4b 100644 --- a/src/mod_accesslog.c +++ b/src/mod_accesslog.c @@ -453,7 +453,9 @@ SETDEFAULTS_FUNC(mod_accesslog_set_defaults) { } } + #ifdef HAVE_SYSLOG_H p->defaults.syslog_level = LOG_INFO; + #endif /* initialize p->defaults from global config context */ if (p->nconfig > 0 && p->cvlist->v.u2[1]) { |