Fix compiler error on FreeBSD
This commit is contained in:
parent
fb123f8fd0
commit
abae027538
@ -1,3 +1,8 @@
|
||||
Version 0.9.7 (unreleased)
|
||||
--------------
|
||||
Compatibility:
|
||||
* Runs on FreeBSD
|
||||
|
||||
Version 0.9.6
|
||||
---------------
|
||||
Fixed bugs:
|
||||
|
@ -14,7 +14,7 @@ namespace cpputils{
|
||||
if (0 != result) {
|
||||
throw std::runtime_error("sysctlbyname syscall failed");
|
||||
}
|
||||
#elif __linux__
|
||||
#elif __linux__ || __FreeBSD__
|
||||
long numRAMPages = sysconf(_SC_PHYS_PAGES);
|
||||
long pageSize = sysconf(_SC_PAGESIZE);
|
||||
mem = numRAMPages * pageSize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user