Fix Linux build

This commit is contained in:
Tillmann Karras
2016-07-30 23:58:02 +01:00
parent 1252bd653d
commit 61eddbd1fa
3 changed files with 4 additions and 3 deletions

View File

@@ -11,6 +11,7 @@
#include "common/string_util.h"
#else
#include <cstdlib>
#include <cstring>
#include <sys/mman.h>
#endif

View File

@@ -82,7 +82,7 @@ static CPUCaps Detect() {
caps.vendor = CPUVendor::OTHER;
// Set reasonable default brand string even if brand string not available
strcpy_s(caps.cpu_string, sizeof(caps.cpu_string), caps.brand_string);
strncpy(caps.cpu_string, caps.brand_string, sizeof(caps.cpu_string));
// Detect family and other miscellaneous features
if (max_std_fn >= 1) {