Fix build with GCC

This commit is contained in:
ShadowNinja 2013-09-26 12:43:50 -04:00
parent 39bc436c8a
commit b4f863f045
2 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,9 @@
#ifndef _MSC_VER
#include <unistd.h>
#endif
#if defined(__GNUC__)
#include <sys/sysinfo.h>
#endif
#include "ThreadLocalStorage.h"
SPADES_SETTING(core_numDispatchQueueThreads, "auto");
@ -61,6 +64,8 @@ static int GetNumCores() {
if(count < 1) { count = 1; }
}
return count;
#elif defined(__GNUC__)
return get_nprocs();
#else
return sysconf(_SC_NPROCESSORS_ONLN);
#endif

View File

@ -24,6 +24,7 @@
#include "IGLDevice.h"
#include <stdint.h>
#include <vector>
#include <stdint.h>
namespace spades {
namespace draw {