diff options
author | Eric Covener <covener@gmail.com> | 2018-03-17 14:00:15 -0400 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2018-03-21 06:35:53 +1000 |
commit | a9dd51a800f1920aa7545dc2f4f831000a60af48 (patch) | |
tree | 49c1abd4e43ff72b014ea11155f95ce4284cb3fa | |
parent | f6add6ac2c42df37d63b36dbef43e701875893d7 (diff) |
aix compat fixes for ocsp.c
WCOREDUMP and vsyslog are not portable
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5657)
-rw-r--r-- | apps/ocsp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c index 7581531ccf..015f4d3d1f 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -813,7 +813,10 @@ log_message(int level, const char *fmt, ...) va_start(ap, fmt); # ifdef OCSP_DAEMON if (multi) { - vsyslog(level, fmt, ap); + char buf[1024]; + if (vsnprintf(buf, sizeof(buf), fmt, ap) > 0) { + syslog(level, "%s", buf); + } if (level >= LOG_ERR) ERR_print_errors_cb(print_syslog, &level); } @@ -928,7 +931,10 @@ static void spawn_loop(void) else if (WIFSIGNALED(status)) syslog(LOG_WARNING, "child process: %ld, term signal %d%s", (long)fpid, WTERMSIG(status), - WCOREDUMP(status) ? " (core dumped)" : ""); +#ifdef WCOREDUMP + WCOREDUMP(status) ? " (core dumped)" : +#endif + ""); sleep(1); } break; |