Fix include of windows.h in mmap.h (#10885)

Summary:
If windows.h is not included in a particular way, it can conflict with other code including it. I don't know all the details, but having just one standard place where we include windows.h in header files seems best and seems to fix the internal issue we hit.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10885

Test Plan: CI and internal validation

Reviewed By: anand1976

Differential Revision: D40738945

Pulled By: pdillinger

fbshipit-source-id: 88f635e895b1c7b810baad159e6dbb8351344cac
This commit is contained in:
Peter Dillinger 2022-10-26 18:07:57 -07:00 committed by Facebook GitHub Bot
parent 17553bdd5e
commit 5d3953114f
1 changed files with 2 additions and 2 deletions

View File

@ -6,8 +6,8 @@
#pragma once
#ifdef OS_WIN
#include <windows.h>
// ^^^ Must come first
#include "port/win/port_win.h"
// ^^^ For proper/safe inclusion of windows.h. Must come first.
#include <memoryapi.h>
#else
#include <sys/mman.h>