From 5d3953114ff0dc147a818c789b2e9c96051ccde8 Mon Sep 17 00:00:00 2001 From: Peter Dillinger Date: Wed, 26 Oct 2022 18:07:57 -0700 Subject: [PATCH] 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 --- port/mmap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/port/mmap.h b/port/mmap.h index 720b670886..7342a13f96 100644 --- a/port/mmap.h +++ b/port/mmap.h @@ -6,8 +6,8 @@ #pragma once #ifdef OS_WIN -#include -// ^^^ Must come first +#include "port/win/port_win.h" +// ^^^ For proper/safe inclusion of windows.h. Must come first. #include #else #include