aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Azzarone <andrea.azzarone@canonical.com>2017-10-23 12:50:46 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-23 12:53:12 +0200
commit9e3d76b638bcbd877eb7fe716190c0424c95a9d2 (patch)
treec08b7755a55da957e025eb97106810d96529d19c
parent9db77568d4af0b7489702a33b4fcadc36f7359ac (diff)
downloadayatana-indicator-sound-9e3d76b638bcbd877eb7fe716190c0424c95a9d2.tar.gz
ayatana-indicator-sound-9e3d76b638bcbd877eb7fe716190c0424c95a9d2.tar.bz2
ayatana-indicator-sound-9e3d76b638bcbd877eb7fe716190c0424c95a9d2.zip
Include <functional> to fix a build issues with g++7.
-rw-r--r--src/gmenuharness/MatchUtils.cpp6
-rw-r--r--tests/notifications-test.cc1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gmenuharness/MatchUtils.cpp b/src/gmenuharness/MatchUtils.cpp
index 1eeaf52..dd4a247 100644
--- a/src/gmenuharness/MatchUtils.cpp
+++ b/src/gmenuharness/MatchUtils.cpp
@@ -18,6 +18,8 @@
#include <desktop/gmenuharness/MatchUtils.h>
+#include <functional>
+
#include <desktop/util/ResourcePtr.h>
using namespace std;
@@ -33,7 +35,7 @@ void waitForCore (GObject * obj, const string& signalName, unsigned int timeout)
shared_ptr<GMainLoop> loop(g_main_loop_new(nullptr, false), &g_main_loop_unref);
/* Our two exit criteria */
- util::ResourcePtr<gulong, function<void(gulong)>> signal(
+ util::ResourcePtr<gulong, std::function<void(gulong)>> signal(
g_signal_connect_swapped(obj, signalName.c_str(),
G_CALLBACK(g_main_loop_quit), loop.get()),
[obj](gulong s)
@@ -41,7 +43,7 @@ void waitForCore (GObject * obj, const string& signalName, unsigned int timeout)
g_signal_handler_disconnect(obj, s);
});
- util::ResourcePtr<guint, function<void(guint)>> timer(g_timeout_add(timeout,
+ util::ResourcePtr<guint, std::function<void(guint)>> timer(g_timeout_add(timeout,
[](gpointer user_data) -> gboolean
{
g_main_loop_quit((GMainLoop *)user_data);
diff --git a/tests/notifications-test.cc b/tests/notifications-test.cc
index 2e5acd4..6dbbe0c 100644
--- a/tests/notifications-test.cc
+++ b/tests/notifications-test.cc
@@ -19,6 +19,7 @@
*/
#include <algorithm>
+#include <functional>
#include <memory>
#include <gtest/gtest.h>