Merge pull request #78 from ShadowNinja/gcc_fix

Fix build with GCC
This commit is contained in:
yvt 2013-09-26 10:06:41 -07:00
commit 85754f371f
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 {