You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2016/03/24 10:27:07 UTC
[09/11] mesos git commit: Windows: [2/3] Transitioned `os::recv` to
use `os::pagesize`.
Windows: [2/3] Transitioned `os::recv` to use `os::pagesize`.
Review: https://reviews.apache.org/r/44092/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/0652a6f8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/0652a6f8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/0652a6f8
Branch: refs/heads/master
Commit: 0652a6f8ac38d31fd59c6c71c75ec458274fe73c
Parents: 2b9b88e
Author: Daniel Pravat <dp...@outlook.com>
Authored: Thu Mar 24 09:34:20 2016 +0100
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Thu Mar 24 10:26:50 2016 +0100
----------------------------------------------------------------------
3rdparty/libprocess/src/socket.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/0652a6f8/3rdparty/libprocess/src/socket.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/socket.cpp b/3rdparty/libprocess/src/socket.cpp
index ab73814..ec0e913 100644
--- a/3rdparty/libprocess/src/socket.cpp
+++ b/3rdparty/libprocess/src/socket.cpp
@@ -10,8 +10,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-#include <unistd.h> // For sysconf.
-
#include <memory>
#include <string>
@@ -21,6 +19,8 @@
#include <process/owned.hpp>
#include <process/socket.hpp>
+#include <stout/os.hpp>
+
#ifdef USE_SSL_SOCKET
#include "libevent_ssl_socket.hpp"
#include "openssl.hpp"
@@ -195,7 +195,7 @@ Future<string> Socket::Impl::recv(const Option<ssize_t>& size)
{
// Default chunk size to attempt to receive when nothing is
// specified represents roughly 16 pages.
- static const size_t DEFAULT_CHUNK = 16 * sysconf(_SC_PAGESIZE);
+ static const size_t DEFAULT_CHUNK = 16 * os::pagesize();
size_t chunk = (size.isNone() || size.get() < 0)
? DEFAULT_CHUNK