Description: Fixes the compilation errors with GCC 7 Origin: backport, http://trac.webkit.org/changeset/217601/webkit http://trac.webkit.org/changeset/211434/webkit http://trac.webkit.org/changeset/218488/webkit --- a/modules/web/src/main/native/Source/cmake/OptionsCommon.cmake +++ b/modules/web/src/main/native/Source/cmake/OptionsCommon.cmake @@ -38,7 +38,9 @@ define_property(TARGET PROPERTY FOLDER INHERITED BRIEF_DOCS "folder" FULL_DOCS "IDE folder name") if (COMPILER_IS_GCC_OR_CLANG) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-expansion-to-defined") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -fno-strict-aliasing") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-expansion-to-defined") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y") endif () --- a/modules/web/src/main/native/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h +++ b/modules/web/src/main/native/Source/JavaScriptCore/inspector/InspectorBackendDispatcher.h @@ -28,6 +28,7 @@ #include "InspectorFrontendRouter.h" #include "InspectorProtocolTypes.h" +#include <functional> #include <wtf/DeprecatedOptional.h> #include <wtf/Optional.h> #include <wtf/RefCounted.h> --- a/modules/web/src/main/native/Source/WebCore/css/CSSValue.h +++ b/modules/web/src/main/native/Source/WebCore/css/CSSValue.h @@ -22,6 +22,7 @@ #include "ExceptionOr.h" #include "URLHash.h" +#include <functional> #include <wtf/HashMap.h> #include <wtf/ListHashSet.h> #include <wtf/RefCounted.h> --- a/modules/web/src/main/native/Source/WebCore/css/StyleSheetContents.h +++ b/modules/web/src/main/native/Source/WebCore/css/StyleSheetContents.h @@ -23,6 +23,7 @@ #include "CSSParserMode.h" #include "CachePolicy.h" #include "URL.h" +#include <functional> #include <wtf/HashMap.h> #include <wtf/ListHashSet.h> #include <wtf/RefCounted.h> --- a/modules/web/src/main/native/Source/WebCore/dom/SlotAssignment.h +++ b/modules/web/src/main/native/Source/WebCore/dom/SlotAssignment.h @@ -27,6 +27,7 @@ #include "RenderTreeUpdater.h" #include "ShadowRoot.h" +#include <functional> #include <wtf/HashMap.h> #include <wtf/HashSet.h> #include <wtf/Vector.h> --- a/modules/web/src/main/native/Source/WebCore/loader/NetscapePlugInStreamLoader.h +++ b/modules/web/src/main/native/Source/WebCore/loader/NetscapePlugInStreamLoader.h @@ -29,6 +29,7 @@ #pragma once #include "ResourceLoader.h" +#include <functional> #include <wtf/Forward.h> namespace WebCore { --- a/modules/web/src/main/native/Source/WebCore/loader/ResourceLoader.h +++ b/modules/web/src/main/native/Source/WebCore/loader/ResourceLoader.h @@ -34,6 +34,7 @@ #include "ResourceLoaderTypes.h" #include "ResourceRequest.h" #include "ResourceResponse.h" +#include <functional> #include <wtf/Forward.h> #if ENABLE(CONTENT_EXTENSIONS)