summaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/nginx.c4
-rw-r--r--src/core/ngx_log.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 0f19371e6..ffd63cf59 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -270,6 +270,10 @@ main(int argc, char *const *argv)
ngx_pid = ngx_getpid();
+ if (ngx_strerror_init() != NGX_OK) {
+ return 1;
+ }
+
log = ngx_log_init(ngx_prefix);
if (log == NULL) {
return 1;
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index c0485c61b..156d3567f 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -248,7 +248,7 @@ ngx_log_errno(u_char *buf, u_char *last, ngx_err_t err)
buf = ngx_slprintf(buf, last, " (%d: ", err);
#endif
- buf = ngx_strerror_r(err, buf, last - buf);
+ buf = ngx_strerror(err, buf, last - buf);
if (buf < last) {
*buf++ = ')';