From a0027ec71f608447b08d0e9e977f57ac4da5fb88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Wed, 3 Jun 2015 17:52:40 -0400
Subject: [PATCH] android: fix daemon build

Refs #74605

Change-Id: I5e21003083a765c9424fe370a1848074d391bfc1
---
 configure.ac       | 2 +-
 src/rational.h     | 2 ++
 src/string_utils.h | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 54f16a4fcb..e293a0135c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -388,7 +388,7 @@ AS_IF([test "x$enable_video" != "xno"],
       [
         AC_DEFINE(RING_VIDEO, [], [Video support enabled])
         AM_CONDITIONAL(RING_VIDEO, true)
-        AS_IF([test "$SYS" = linux],[
+        AS_IF([test "$SYS" = linux && test -z "${HAVE_ANDROID_FALSE}"],[
             PKG_CHECK_MODULES(UDEV, libudev,, AC_MSG_ERROR([Missing libudev development files]))
         ],[
         ])
diff --git a/src/rational.h b/src/rational.h
index 681f8fc4f4..023221d66f 100644
--- a/src/rational.h
+++ b/src/rational.h
@@ -31,7 +31,9 @@
 
 #pragma once
 
+#include <utility> // std::swap
 #include <cstdlib> // std::abs
+#include <iostream>
 
 namespace ring {
 
diff --git a/src/string_utils.h b/src/string_utils.h
index 6e09f64f84..b23470f4e0 100644
--- a/src/string_utils.h
+++ b/src/string_utils.h
@@ -59,7 +59,7 @@ bool_to_str(bool b) noexcept
 // We implement them by ourself as well as possible here.
 
 template <typename T>
-std::string
+inline std::string
 to_string(T &&value)
 {
     std::ostringstream os;
@@ -67,7 +67,7 @@ to_string(T &&value)
     return os.str();
 }
 
-int
+static inline int
 stoi(const std::string& str)
 {
     int v;
-- 
GitLab