Skip to content

Commit e7265ac

Browse files
committed
FreeBSD: locate sysconf
1 parent b5638e7 commit e7265ac

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Common/Core/SysInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <VersionHelpers.h>
1212
#ifdef __APPLE__
1313
#include <sys/sysctl.h> // sysctl*
14-
#elif defined(__linux__)
14+
#elif defined(__linux__) || defined(__FreeBSD__)
1515
#include <unistd.h> // sysconf
1616
#endif
1717
// Initialization order
@@ -195,7 +195,7 @@ AutoSystemInfo::InitPhysicalProcessorCount()
195195
countPhysicalProcessor = 1;
196196
}
197197
}
198-
#elif defined(__linux__)
198+
#elif defined(__linux__) || defined(__FreeBSD__)
199199
countPhysicalProcessor = sysconf(_SC_NPROCESSORS_ONLN);
200200
#else
201201
// implementation for __linux__ should work for some others.

0 commit comments

Comments
 (0)