diff --git a/ports/folly/CONTROL b/ports/folly/CONTROL index 1709a4515ea699..268039ac797def 100644 --- a/ports/folly/CONTROL +++ b/ports/folly/CONTROL @@ -1,5 +1,5 @@ Source: folly -Version: 2019.05.20.00 +Version: 2019.05.20.00-1 Homepage: https://github.com/facebook/folly Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread, boost-smart-ptr diff --git a/ports/folly/disable-non-underscore-posix-names.patch b/ports/folly/disable-non-underscore-posix-names.patch new file mode 100644 index 00000000000000..bbe79481cfafea --- /dev/null +++ b/ports/folly/disable-non-underscore-posix-names.patch @@ -0,0 +1,27 @@ +diff --git a/folly/portability/Windows.h b/folly/portability/Windows.h +index f7990ca..b22fac5 100644 +--- a/folly/portability/Windows.h ++++ b/folly/portability/Windows.h +@@ -26,16 +26,12 @@ + // These have to be this way because we define our own versions + // of close(), because the normal Windows versions don't handle + // sockets at all. +-#ifndef __STDC__ +-/* nolint */ +-#define __STDC__ 1 +-#include // @manual nolint +-#include // @manual nolint +-#undef __STDC__ +-#else +-#include // @manual nolint +-#include // @manual nolint +-#endif ++#include ++#pragma push_macro("_CRT_INTERNAL_NONSTDC_NAMES") ++#define _CRT_INTERNAL_NONSTDC_NAMES 0 ++#include ++#include ++#pragma pop_macro("_CRT_INTERNAL_NONSTDC_NAMES") + + #if defined(min) || defined(max) + #error Windows.h needs to be included by this header, or else NOMINMAX needs \ diff --git a/ports/folly/portfile.cmake b/ports/folly/portfile.cmake index 7e7f4056570f49..abf32aa99105c6 100644 --- a/ports/folly/portfile.cmake +++ b/ports/folly/portfile.cmake @@ -21,6 +21,7 @@ vcpkg_from_github( missing-include-atomic.patch boost-1.70.patch reorder-glog-gflags.patch + disable-non-underscore-posix-names.patch ) file(COPY