Fix test build break.

Change-Id: I73a39c6d4bb9baebbfb5572e9259bcd405116039
This commit is contained in:
Josh Gao 2015-11-19 13:44:20 -08:00
parent c22a7de798
commit 2feb9dde60

View File

@ -17,6 +17,7 @@
#include <gtest/gtest.h>
#include <sys/mman.h>
#include <sys/user.h>
#include <sys/types.h>
#include <unistd.h>
@ -220,7 +221,7 @@ TEST(sys_mman, mremap) {
ASSERT_EQ(MAP_FAILED, mremap(nullptr, 0, 0, 0));
}
const size_t huge = PTRDIFF_MAX + 1;
const size_t huge = size_t(PTRDIFF_MAX) + 1;
TEST(sys_mman, mmap_PTRDIFF_MAX) {
ASSERT_EQ(MAP_FAILED, mmap(nullptr, huge, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0));