From befa9a8afc9c5669265353497ee2a9ed3bd56882 Mon Sep 17 00:00:00 2001 From: Sangwan Kwon Date: Wed, 12 Jun 2019 11:28:23 +0900 Subject: [PATCH] Fix build error on upstream-1.4.1 Signed-off-by: Sangwan Kwon --- include/osquery/sql.h | 2 +- osquery/distributed/CMakeLists.txt | 2 +- osquery/events/events_database_tests.cpp | 2 ++ osquery/events/events_tests.cpp | 2 ++ osquery/events/linux/inotify_tests.cpp | 2 ++ packaging/osquery.spec | 1 + 6 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/osquery/sql.h b/include/osquery/sql.h index b83803c..9526f4c 100644 --- a/include/osquery/sql.h +++ b/include/osquery/sql.h @@ -176,7 +176,7 @@ Status getQueryColumns(const std::string& q, tables::TableColumns& columns); */ class MockSQL : public SQL { public: - explicit MockSQL() : MockSQL({}) {} + explicit MockSQL() : MockSQL(results_) {} explicit MockSQL(const QueryData& results) : MockSQL(results, Status()) {} explicit MockSQL(const QueryData& results, const Status& status) { results_ = results; diff --git a/osquery/distributed/CMakeLists.txt b/osquery/distributed/CMakeLists.txt index 1d49aa1..393672a 100644 --- a/osquery/distributed/CMakeLists.txt +++ b/osquery/distributed/CMakeLists.txt @@ -1,3 +1,3 @@ ADD_OSQUERY_LIBRARY(TRUE osquery_distributed distributed.cpp) -ADD_OSQUERY_TEST(TRUE distributed_tests distributed_tests.cpp) +ADD_OSQUERY_TEST(TRUE osquery_distributed_tests distributed_tests.cpp) diff --git a/osquery/events/events_database_tests.cpp b/osquery/events/events_database_tests.cpp index 6b34693..8c7a0be 100644 --- a/osquery/events/events_database_tests.cpp +++ b/osquery/events/events_database_tests.cpp @@ -11,6 +11,8 @@ #include #include +#define GTEST_HAS_TR1_TUPLE 0 + #include #include diff --git a/osquery/events/events_tests.cpp b/osquery/events/events_tests.cpp index d91f209..ff6fd55 100644 --- a/osquery/events/events_tests.cpp +++ b/osquery/events/events_tests.cpp @@ -12,6 +12,8 @@ #include +#define GTEST_HAS_TR1_TUPLE 0 + #include #include diff --git a/osquery/events/linux/inotify_tests.cpp b/osquery/events/linux/inotify_tests.cpp index d62e631..a7ae6e8 100644 --- a/osquery/events/linux/inotify_tests.cpp +++ b/osquery/events/linux/inotify_tests.cpp @@ -14,6 +14,8 @@ #include #include +#define GTEST_HAS_TR1_TUPLE 0 + #include #include diff --git a/packaging/osquery.spec b/packaging/osquery.spec index e7fbc5d..b8d15e4 100644 --- a/packaging/osquery.spec +++ b/packaging/osquery.spec @@ -91,6 +91,7 @@ Testcases for osquery %{_bindir}/osquery_logger_tests %{_bindir}/osquery_conversions_tests %{_bindir}/osquery_dispatcher_tests +%{_bindir}/osquery_distributed_tests %{_bindir}/osquery_events_tests %{_bindir}/osquery_events_database_tests %{_bindir}/osquery_inotify_tests -- 2.7.4