diff options
| author | Howard Ro <yro@google.com> | 2018-10-15 21:42:34 -0700 |
|---|---|---|
| committer | Howard Ro <yro@google.com> | 2018-10-18 10:39:40 -0700 |
| commit | 34bc567a939d9ddbd532b9fd5caeac054b79f124 (patch) | |
| tree | 66031824921be476ecf3d188a65baf6e7989c01d /libstats | |
| parent | 89bf115a702cf1a38887004b526735638b4d9ddd (diff) | |
| download | system_core-34bc567a939d9ddbd532b9fd5caeac054b79f124.tar.gz system_core-34bc567a939d9ddbd532b9fd5caeac054b79f124.tar.bz2 system_core-34bc567a939d9ddbd532b9fd5caeac054b79f124.zip | |
Make native metrics logger write to statsd socket
Bug: 110537511
Test: compiles without failures and verified the correct metric
Change-Id: Ie8019a20a2112ed6cbbc0999d68592efb8f0f538
Diffstat (limited to 'libstats')
| -rw-r--r-- | libstats/Android.bp | 4 | ||||
| -rw-r--r-- | libstats/statsd_writer.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libstats/Android.bp b/libstats/Android.bp index d58f29417..f5ee1dada 100644 --- a/libstats/Android.bp +++ b/libstats/Android.bp @@ -17,12 +17,13 @@ // ========================================================== // Native library to write stats log to statsd socket // ========================================================== -cc_library_static { +cc_library { name: "libstatssocket", srcs: [ "stats_event_list.c", "statsd_writer.c", ], + host_supported: true, cflags: [ "-Wall", "-Werror", @@ -32,6 +33,7 @@ cc_library_static { ], export_include_dirs: ["include"], shared_libs: [ + "libcutils", "liblog", ], } diff --git a/libstats/statsd_writer.c b/libstats/statsd_writer.c index afe401f5c..e24dff0b6 100644 --- a/libstats/statsd_writer.c +++ b/libstats/statsd_writer.c @@ -15,7 +15,9 @@ */ #include "statsd_writer.h" +#include <cutils/fs.h> #include <cutils/sockets.h> +#include <cutils/threads.h> #include <endian.h> #include <errno.h> #include <fcntl.h> |
