1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 04:44:10 +02:00
openwrt-packages/net/boinc/patches/002-hosttypeRespected
krant d1e721720f boinc: update to 7.24.3
- Use local tarball
- Remove upstreamed and refresh remaining patches

Signed-off-by: krant <aleksey.vasilenko@gmail.com>
2024-02-22 15:22:03 -08:00

50 lines
1.3 KiB
Plaintext

--- a/client/cs_platforms.cpp
+++ b/client/cs_platforms.cpp
@@ -171,6 +171,21 @@ int launch_child_process_to_detect_emula
//
void CLIENT_STATE::detect_platforms() {
+// if specified - use it
+#ifdef HOSTTYPE
+ add_platform(HOSTTYPE);
+#endif
+
+// if specified - use it
+#ifdef HOSTTYPEALT
+ add_platform(HOSTTYPEALT);
+#endif
+
+// if both the hosttype and its alternative are specified,
+// there is no need to look further and one should go directly
+// to the inspection of the cc_config.xml data
+#if !defined(HOSTTYPE) || !defined(HOSTTYPEALT)
+
#if defined(_WIN32) && !defined(__CYGWIN32__)
#if defined(_WIN64) && defined(_M_X64)
add_platform("windows_x86_64");
@@ -306,15 +321,6 @@ void CLIENT_STATE::detect_platforms() {
add_platform("i686-pc-linux-gnu");
}
- if (!(support64 || support32)) {
- // Something went wrong. Assume HOSTTYPE and HOSTTYPEALT
- // are correct
- add_platform(HOSTTYPE);
-#ifdef HOSTTYPEALT
- add_platform(HOSTTYPEALT);
-#endif
- }
-
#elif defined(sun)
// Check if we can run 64-bit binaries...
// this assumes there isn't a 64-bit only solaris. (Every 64-bit solaris can run 32 bit binaries)
@@ -390,6 +396,8 @@ void CLIENT_STATE::detect_platforms() {
#endif
#endif
+
+#endif
if (cc_config.no_alt_platform) {
PLATFORM p = platforms[0];