summaryrefslogtreecommitdiff
path: root/libc/async_safe/async_safe_log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libc/async_safe/async_safe_log.cpp')
-rw-r--r--libc/async_safe/async_safe_log.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libc/async_safe/async_safe_log.cpp b/libc/async_safe/async_safe_log.cpp
index 78f62bdba..d5aad16d6 100644
--- a/libc/async_safe/async_safe_log.cpp
+++ b/libc/async_safe/async_safe_log.cpp
@@ -47,6 +47,7 @@
#include <async_safe/log.h>
#include "private/CachedProperty.h"
+#include "private/ErrnoRestorer.h"
#include "private/ScopedPthreadMutexLocker.h"
// Must be kept in sync with frameworks/base/core/java/android/util/EventLog.java.
@@ -508,6 +509,7 @@ int async_safe_write_log(int priority, const char* tag, const char* msg) {
}
int async_safe_format_log_va_list(int priority, const char* tag, const char* format, va_list args) {
+ ErrnoRestorer errno_restorer;
char buffer[1024];
BufferOutputStream os(buffer, sizeof(buffer));
out_vformat(os, format, args);