/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <folly/portability/SysMman.h>
#ifdef _WIN32
+
#include <cassert>
+
#include <folly/Portability.h>
#include <folly/portability/Windows.h>
}
extern "C" {
-int madvise(const void* addr, size_t len, int advise) {
+int madvise(const void* /* addr */, size_t /* len */, int /* advise */) {
// We do nothing at all.
// Could probably implement dontneed via VirtualAlloc
// with the MEM_RESET and MEM_RESET_UNDO flags.
ret = MapViewOfFileEx(
fmh,
accessFlags,
- (DWORD)((off >> 32) & 0xFFFFFFFF),
+ (DWORD)(0), // off_t is only 32-bit :(
(DWORD)(off & 0xFFFFFFFF),
0,
addr);
return 0;
}
}
+
#endif