From 0fe3b67024bfb4dfe4062c722532f20e35242238 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 20 Aug 2020 15:40:57 -0700 Subject: [PATCH] Fix logd's implicit dependency on libsysutils. We're trying to remove the implicit dependency on libsysutils that *all* code has via the symlink in system/core/include/, but netd and logd have code that #includes the headers without declaring the dependency (which works out in the end because their executables declare the dependency). Bug: http://b/165825252 Test: treehugger Change-Id: I8c582e427d9dbe7d9f8172c445f38ae2737a9049 --- logd/ChattyLogBuffer.h | 1 - logd/LogReader.h | 2 -- logd/LogReaderThread.h | 1 - logd/LogTags.cpp | 1 + logd/LogUtils.h | 3 ++- logd/logd_test.cpp | 2 +- 6 files changed, 4 insertions(+), 6 deletions(-) diff --git a/logd/ChattyLogBuffer.h b/logd/ChattyLogBuffer.h index ce3dc7bc2..b4d3a2ff3 100644 --- a/logd/ChattyLogBuffer.h +++ b/logd/ChattyLogBuffer.h @@ -25,7 +25,6 @@ #include #include #include -#include #include "LogBuffer.h" #include "LogBufferElement.h" diff --git a/logd/LogReader.h b/logd/LogReader.h index b85a58478..a4e52c4eb 100644 --- a/logd/LogReader.h +++ b/logd/LogReader.h @@ -22,8 +22,6 @@ #include "LogReaderList.h" #include "LogReaderThread.h" -#define LOGD_SNDTIMEO 32 - class LogReader : public SocketListener { public: explicit LogReader(LogBuffer* logbuf, LogReaderList* reader_list); diff --git a/logd/LogReaderThread.h b/logd/LogReaderThread.h index 1855c0e26..20624f2e4 100644 --- a/logd/LogReaderThread.h +++ b/logd/LogReaderThread.h @@ -27,7 +27,6 @@ #include #include -#include #include "LogBuffer.h" #include "LogWriter.h" diff --git a/logd/LogTags.cpp b/logd/LogTags.cpp index 1b7107f8a..6ab3b48b4 100644 --- a/logd/LogTags.cpp +++ b/logd/LogTags.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include diff --git a/logd/LogUtils.h b/logd/LogUtils.h index df78a508a..c0f62d39c 100644 --- a/logd/LogUtils.h +++ b/logd/LogUtils.h @@ -20,12 +20,13 @@ #include #include -#include #include // Hijack this header as a common include file used by most all sources // to report some utilities defined here and there. +#define LOGD_SNDTIMEO 32 + namespace android { // Furnished in main.cpp. Caller must own and free returned value diff --git a/logd/logd_test.cpp b/logd/logd_test.cpp index 202ab062b..828f58056 100644 --- a/logd/logd_test.cpp +++ b/logd/logd_test.cpp @@ -40,7 +40,7 @@ #include #endif -#include "LogReader.h" // pickup LOGD_SNDTIMEO +#include "LogUtils.h" // For LOGD_SNDTIMEO. using android::base::unique_fd;