From 8fda2bae889c881bf2ae032ca8bdc79cf642ebc5 Mon Sep 17 00:00:00 2001 From: Android Tools Maintainers Date: Tue, 2 Aug 2022 16:23:27 +0100 Subject: [PATCH] Turn #error into exceptions Forwarded: not-needed So the library can be built on non-Linux platforms too, although can't guarauntee its functionality regarding that piece of code. Gbp-Pq: Topic system/core Gbp-Pq: Name throw-exception-on-unknown-os.patch --- system/core/base/file.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/core/base/file.cpp b/system/core/base/file.cpp index 33daea21..f5077fe4 100644 --- a/system/core/base/file.cpp +++ b/system/core/base/file.cpp @@ -461,7 +461,8 @@ std::string GetExecutablePath() { path[PATH_MAX - 1] = 0; return path; #else -#error unknown OS +#include + throw std::runtime_error(std::string("Unknown OS!")); #endif } -- 2.30.2