Commit Diff


commit - f334529ed243c898cbf0cc8ee1058a769444f448
commit + 6c6d65896b4a60cb147c853ed0c38882ff0c61c5
blob - 5ad5f520105ec783ec3baffafba82f9b23fabcf7
blob + 475489f44250c20ab71f7a34ced2e19a76d74c47
--- lib/error.c
+++ lib/error.c
@@ -41,8 +41,9 @@ const struct got_error *
 got_error_from_errno()
 {
 	static struct got_error err;
+	static char msg[1024];
 
 	err.code = GOT_ERR_ERRNO;
-	err.msg = strerror(errno);
+	strerror_r(errno, msg, sizeof(msg));
 	return &err;
 }