From: Android Tools Maintainers Date: Fri, 27 Jan 2023 05:43:52 +0000 (+0000) Subject: Turn #error into exceptions X-Git-Tag: archive/raspbian/29.0.6-25+rpi1^2~30 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eac1df6bc7c619375337f77a5839363d3c3b8a0c;p=android-platform-tools.git 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 --- 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 }