Skip to content
Snippets Groups Projects
Commit 3466a4a9 authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Romain M.
Browse files

prevent TARGET_OS_IOS is not defined warnings


first check if TARGET_OS_IOS is defined to prevent warning:
configurationmanager_interface.h:285:29: warning: "TARGET_OS_IOS" is not defined [-Wundef]

Change-Id: Ia7611421992ca5d78cb6d0a4a79ec8499c2b15bc
Reviewed-by: default avatarRomain Bertozzi <romain.bertozzi@savoirfairelinux.com>
parent b736fe2d
No related branches found
No related tags found
No related merge requests found
...@@ -73,10 +73,10 @@ getSignalHandlers() ...@@ -73,10 +73,10 @@ getSignalHandlers()
exported_callback<DRing::ConfigurationSignal::MigrationEnded>(), exported_callback<DRing::ConfigurationSignal::MigrationEnded>(),
exported_callback<DRing::ConfigurationSignal::DeviceRevocationEnded>(), exported_callback<DRing::ConfigurationSignal::DeviceRevocationEnded>(),
exported_callback<DRing::ConfigurationSignal::Error>(), exported_callback<DRing::ConfigurationSignal::Error>(),
#if defined(__ANDROID__) || TARGET_OS_IOS #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
exported_callback<DRing::ConfigurationSignal::GetHardwareAudioFormat>(), exported_callback<DRing::ConfigurationSignal::GetHardwareAudioFormat>(),
#endif #endif
#if defined(__ANDROID__) || TARGET_OS_IOS || defined(RING_UWP) #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS) || defined(RING_UWP)
exported_callback<DRing::ConfigurationSignal::GetAppDataPath>(), exported_callback<DRing::ConfigurationSignal::GetAppDataPath>(),
#endif #endif
......
...@@ -282,13 +282,13 @@ struct ConfigurationSignal { ...@@ -282,13 +282,13 @@ struct ConfigurationSignal {
* These are special getters for Android and UWP, so the daemon can retreive * These are special getters for Android and UWP, so the daemon can retreive
* information only accessible through their respective platform APIs * information only accessible through their respective platform APIs
*/ */
#if defined(__ANDROID__) || TARGET_OS_IOS #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
struct GetHardwareAudioFormat { struct GetHardwareAudioFormat {
constexpr static const char* name = "GetHardwareAudioFormat"; constexpr static const char* name = "GetHardwareAudioFormat";
using cb_type = void(std::vector<int32_t>* /* params_ret */); using cb_type = void(std::vector<int32_t>* /* params_ret */);
}; };
#endif #endif
#if defined(__ANDROID__) || defined(RING_UWP) || TARGET_OS_IOS #if defined(__ANDROID__) || defined(RING_UWP) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
struct GetAppDataPath { struct GetAppDataPath {
constexpr static const char* name = "GetAppDataPath"; constexpr static const char* name = "GetAppDataPath";
using cb_type = void(const std::string& name, std::vector<std::string>* /* path_ret */); using cb_type = void(const std::string& name, std::vector<std::string>* /* path_ret */);
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <TargetConditionals.h> #include <TargetConditionals.h>
#endif #endif
#if defined(__ANDROID__) || TARGET_OS_IOS #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
#include "client/ring_signal.h" #include "client/ring_signal.h"
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
...@@ -175,7 +175,7 @@ create_pidfile() ...@@ -175,7 +175,7 @@ create_pidfile()
std::string std::string
expand_path(const std::string &path) expand_path(const std::string &path)
{ {
#if defined __ANDROID__ || defined RING_UWP || defined WIN32 || TARGET_OS_IOS #if defined __ANDROID__ || defined RING_UWP || defined WIN32 || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
RING_ERR("Path expansion not implemented, returning original"); RING_ERR("Path expansion not implemented, returning original");
return path; return path;
#else #else
...@@ -417,7 +417,7 @@ FileHandle::~FileHandle() ...@@ -417,7 +417,7 @@ FileHandle::~FileHandle()
} }
} }
#if defined(__ANDROID__) || defined(RING_UWP) || TARGET_OS_IOS #if defined(__ANDROID__) || defined(RING_UWP) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
static std::string files_path; static std::string files_path;
static std::string cache_path; static std::string cache_path;
static std::string config_path; static std::string config_path;
...@@ -451,7 +451,7 @@ get_cache_dir() ...@@ -451,7 +451,7 @@ get_cache_dir()
return cache_home; return cache_home;
} else { } else {
#endif #endif
#if defined(__ANDROID__) || TARGET_OS_IOS #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
std::vector<std::string> paths; std::vector<std::string> paths;
emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("cache", &paths); emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("cache", &paths);
if (not paths.empty()) if (not paths.empty())
...@@ -473,7 +473,7 @@ get_cache_dir() ...@@ -473,7 +473,7 @@ get_cache_dir()
std::string std::string
get_home_dir() get_home_dir()
{ {
#if defined(__ANDROID__) || TARGET_OS_IOS #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
std::vector<std::string> paths; std::vector<std::string> paths;
emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("files", &paths); emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("files", &paths);
if (not paths.empty()) if (not paths.empty())
...@@ -517,7 +517,7 @@ get_home_dir() ...@@ -517,7 +517,7 @@ get_home_dir()
std::string std::string
get_data_dir() get_data_dir()
{ {
#if defined(__ANDROID__) || TARGET_OS_IOS #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
std::vector<std::string> paths; std::vector<std::string> paths;
emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("files", &paths); emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("files", &paths);
if (not paths.empty()) if (not paths.empty())
...@@ -553,7 +553,7 @@ get_data_dir() ...@@ -553,7 +553,7 @@ get_data_dir()
std::string std::string
get_config_dir() get_config_dir()
{ {
#if defined(__ANDROID__) || TARGET_OS_IOS #if defined(__ANDROID__) || (defined(TARGET_OS_IOS) && TARGET_OS_IOS)
std::vector<std::string> paths; std::vector<std::string> paths;
emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("config", &paths); emitSignal<DRing::ConfigurationSignal::GetAppDataPath>("config", &paths);
if (not paths.empty()) if (not paths.empty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment