Bug 162268

Summary: webkitgtk-2.14.0 build failure on Linux with clang/libc++
Product: WebKit Reporter: Armin K. <krejzi>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bugs-noreply, cgarcia
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   

Description Armin K. 2016-09-20 07:51:54 PDT
When building webkitgtk-2.14.0 with clang++, which uses libc++ as its standard library, the build fails with the following errors:

In file included from /home/armin/src/webkitgtk-2.14.0/Source/WebCore/platform/gtk/PasteboardHelper.cpp:24:
/home/armin/src/webkitgtk-2.14.0/Source/WebCore/platform/gtk/PasteboardHelper.h:49:75: error: no type named 'function' in namespace 'std'
    void writeClipboardContents(GtkClipboard*, const DataObjectGtk&, std::function<void()>&& primarySelectionCleared = nullptr);
                                                                     ~~~~~^

In file included from /home/armin/src/webkitgtk-2.14.0/Source/WebCore/platform/gtk/PlatformPasteboardGtk.cpp:20:
/home/armin/src/webkitgtk-2.14.0/Source/WebCore/platform/PlatformPasteboard.h:89:72: error: no template named 'function' in namespace 'std'; did you mean 'Function'?
    WEBCORE_EXPORT void writeToClipboard(const RefPtr<DataObjectGtk>&, std::function<void()>&& primarySelectionCleared);
                                                                       ^~~~~~~~~~~~~

Solution was to add #include <functional> to Source/WebCore/platform/gtk/PasteboardHelper.h and Source/WebCore/platform/PlatformPasteboard.h
Comment 1 Carlos Garcia Campos 2016-09-20 08:31:24 PDT

*** This bug has been marked as a duplicate of bug 162261 ***