Merge pull request #3426 from BOINC/fix_mac_platform

Mac: allow 32-bit applications only if OS X version < 10.15
This commit is contained in:
Kevin Reed 2020-01-23 07:23:12 -06:00 committed by GitHub
commit ca9a2c56bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -42,6 +42,7 @@ LPFN_ISWOW64PROCESS fnIsWow64Process;
#if defined(__APPLE__) && (defined(__i386__) || defined(__x86_64__))
#include <sys/sysctl.h>
extern int compareOSVersionTo(int toMajor, int toMinor);
#endif
#include "error_numbers.h"
@ -100,7 +101,9 @@ void CLIENT_STATE::detect_platforms() {
#ifdef __x86_64__
add_platform("x86_64-apple-darwin");
add_platform("i686-apple-darwin");
if (compareOSVersionTo(10, 15) < 0) {
add_platform("i686-apple-darwin");
}
#else
#error Mac client now requires a 64-bit system
#endif

View File

@ -145,7 +145,7 @@ static bool compare_pci_slots(int NVIDIA_GPU_Index1, int NVIDIA_GPU_Index2) {
// -1 if the OS version we are running on is less than x.y
// 0 if the OS version we are running on is equal to x.y
// +1 if the OS version we are running on is lgreater than x.y
static int compareOSVersionTo(int toMajor, int toMinor) {
int compareOSVersionTo(int toMajor, int toMinor) {
static SInt32 major = -1;
static SInt32 minor = -1;