Print unknown if release information is unavailable on macOS

At least 10.4 Tiger doesn't support required sysctl name
This commit is contained in:
alexey.lysiuk 2016-11-19 12:44:35 +02:00 committed by Christoph Oelckers
parent 60ac12be0a
commit c28bcca3f3

View file

@ -156,7 +156,7 @@ static void I_DetectOS()
case 12: name = "macOS Sierra"; break;
}
char release[16] = {};
char release[16] = "unknown";
size_t size = sizeof release - 1;
sysctlbyname("kern.osversion", release, &size, nullptr, 0);