merged FreeBSD fix from RC_0_16
This commit is contained in:
parent
dafcf2c5ca
commit
ba4c77e7e5
|
@ -1,4 +1,5 @@
|
|||
|
||||
* fixed FreeBSD build
|
||||
* fixed web seed performance issue whith pieces > 1 MiB
|
||||
* fixed unchoke logic when using web seeds
|
||||
* fixed compatibility with older versions of boost (down to boost 1.40)
|
||||
|
|
|
@ -1452,7 +1452,14 @@ namespace libtorrent
|
|||
// sizing the disk cache size when it's set to
|
||||
// automatic.
|
||||
#ifdef TORRENT_BSD
|
||||
#ifdef HW_MEMSIZE
|
||||
int mib[2] = { CTL_HW, HW_MEMSIZE };
|
||||
#else
|
||||
// not entirely sure this sysctl supports 64
|
||||
// bit return values, but it's probably better
|
||||
// than not building
|
||||
int mib[2] = { CTL_HW, HW_PHYSMEM };
|
||||
#endif
|
||||
size_t len = sizeof(m_physical_ram);
|
||||
if (sysctl(mib, 2, &m_physical_ram, &len, NULL, 0) != 0)
|
||||
m_physical_ram = 0;
|
||||
|
|
Loading…
Reference in New Issue