defines for building on Hurd and BSD kernels

This commit is contained in:
Alberto Luaces
2016-05-31 12:58:57 +01:00
committed by Robert Osfield
parent 37258df59c
commit 68baf15806
5 changed files with 14 additions and 4 deletions

View File

@@ -43,8 +43,10 @@
#endif
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__MACH__)
#include <sys/types.h>
#if !defined (__GNU__)
#include <sys/sysctl.h>
#endif
#endif
#if defined(__ANDROID__)
#ifndef PAGE_SIZE
@@ -996,7 +998,7 @@ int Thread::microSleep(unsigned int microsec)
//
int OpenThreads::GetNumberOfProcessors()
{
#if defined(__linux__)
#if defined(__linux__) || defined(__GNU__)
long ret = sysconf(_SC_NPROCESSORS_ONLN);
if (ret == -1)
return 0;