Bug 128454 - ImageDiff compile fails when compiled with libc++
Summary: ImageDiff compile fails when compiled with libc++
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-08 07:32 PST by Rajaram Gaunker
Modified: 2014-02-08 08:10 PST (History)
2 users (show)

See Also:


Attachments
Patch (993 bytes, patch)
2014-02-08 07:38 PST, Rajaram Gaunker
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rajaram Gaunker 2014-02-08 07:32:26 PST
repro steps: Compile webkit using libc++.

Observation: Following compile errors.

Resolution: include cstdlib in ImageDiff.cpp.

WebKit/Tools/ImageDiff/gtk/ImageDiff.cpp:103:61: error: use of undeclared identifier 'malloc'; did you mean 'g_malloc'?
    unsigned char* diffBuffer = static_cast<unsigned char*>(malloc(width * height));
                                                            ^~~~~~
                                                            g_malloc
webkit_deps/include/glib-2.0/glib/gmem.h:78:10: note: 'g_malloc' declared here
gpointer g_malloc         (gsize         n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
         ^
WebKit/Tools/ImageDiff/gtk/ImageDiff.cpp:147:5: error: use of undeclared identifier 'free'
    free(diffBuffer);
    ^
WebKit/Tools/ImageDiff/gtk/ImageDiff.cpp:207:30: error: use of undeclared identifier 'strtol'
            long imageSize = strtol(tokens[1], 0, 10);
                             ^
3 errors generated.
Comment 1 Rajaram Gaunker 2014-02-08 07:38:09 PST
Created attachment 223567 [details]
Patch
Comment 2 WebKit Commit Bot 2014-02-08 08:09:57 PST
Comment on attachment 223567 [details]
Patch

Clearing flags on attachment: 223567

Committed r163711: <http://trac.webkit.org/changeset/163711>
Comment 3 WebKit Commit Bot 2014-02-08 08:10:00 PST
All reviewed patches have been landed.  Closing bug.