Skip to content

Commit 4149df6

Browse files
author
sebastienr
authored
dlt-logd-converter: fixes android 12 compilation (#445)
* Since android 12 release (and the introduction of this commit https://chromium.googlesource.com/aosp/platform/system/ logging/+/b674866203f05957b2ac5db94c3c0fe3d1d36793), the define ANDROID_LOG_RDONLY and friends have been removed (see the commit for the explanation). Therefore, dlt-logd-converter can't compile anymore since this version. * ANDROID_LOG_RDONLY was a define on O_RDONLY. O_RDONLY is now used to allow the compilation on android 12 as well as previous versions * <log/logprint.h> include is removed because we aren't using any API from this file and moreover, this file shouldn't be included from vendor application (not part of public API) * Direct include on "system/core/include" inside Android.bp is removed because it was previously used to find <log/logprint.h>. This should be avoided. We should keep android build system providing right headers path for us :) Signed-off-by: Sébastien RAILLET <sebastien.raillet@gmail.com>
1 parent 363d433 commit 4149df6

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

Android.bp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,6 @@ cc_binary {
194194
"libdlt",
195195
"liblog",
196196
],
197-
include_dirs: [
198-
"system/core/include",
199-
],
200197
}
201198

202199
// vim: ft=python

src/android/dlt-logd-converter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <csignal>
2323

2424
#include <log/log_read.h>
25-
#include <log/logprint.h>
2625

2726
#include <dlt.h>
2827

@@ -51,7 +50,7 @@ static inline struct logger *init_logger(struct logger_list *logger_list, log_id
5150
static struct logger_list *init_logger_list(bool skip_binary_buffers)
5251
{
5352
struct logger_list *logger_list;
54-
logger_list = android_logger_list_alloc(ANDROID_LOG_RDONLY, 0, 0);
53+
logger_list = android_logger_list_alloc(O_RDONLY, 0, 0);
5554
if (logger_list == nullptr) {
5655
DLT_LOG(dlt_ctx_self, DLT_LOG_FATAL, DLT_STRING("could not allocate logger list"));
5756
return nullptr;

0 commit comments

Comments
 (0)