Bug 158681 - std::atexit used without including cstdlib
Summary: std::atexit used without including cstdlib
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-12 19:38 PDT by Ting-Wei Lan
Modified: 2016-06-16 16:03 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.10 KB, patch)
2016-06-12 19:40 PDT, Ting-Wei Lan
no flags Details | Formatted Diff | Diff
Patch (1.07 KB, patch)
2016-06-12 19:47 PDT, Ting-Wei Lan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ting-Wei Lan 2016-06-12 19:38:52 PDT
This causes compilation error on FreeBSD:

/home/lantw44/webkit/source/WebKit/Source/WebCore/platform/graphics/PlatformDisplay.cpp:169:5: error: no member named 'atexit' in namespace 'std'; did you mean simply
      'atexit'?
    std::atexit([] { PlatformDisplay::sharedDisplay().terminateEGLDisplay(); });
    ^~~~~~~~~~~
    atexit
/usr/include/stdlib.h:84:6: note: 'atexit' declared here
int      atexit(void (*)(void));
         ^
1 error generated.
Comment 1 Ting-Wei Lan 2016-06-12 19:40:06 PDT
Created attachment 281145 [details]
Patch
Comment 2 WebKit Commit Bot 2016-06-12 19:41:28 PDT
Attachment 281145 [details] did not pass style-queue:


ERROR: Source/WebCore/ChangeLog:8:  You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible.  [changelog/nonewtests] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Ting-Wei Lan 2016-06-12 19:47:02 PDT
Created attachment 281146 [details]
Patch
Comment 4 Brent Fulgham 2016-06-16 15:41:04 PDT
Comment on attachment 281146 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281146&action=review

> Source/WebCore/platform/graphics/PlatformDisplay.cpp:29
> +#include <cstdlib>

Was this causing a build error for you?
Comment 5 Brent Fulgham 2016-06-16 15:41:33 PDT
Comment on attachment 281146 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281146&action=review

r=me

>> Source/WebCore/platform/graphics/PlatformDisplay.cpp:29
>> +#include <cstdlib>
> 
> Was this causing a build error for you?

Oh -- for BSD builds. Ok.
Comment 6 WebKit Commit Bot 2016-06-16 16:03:01 PDT
Comment on attachment 281146 [details]
Patch

Clearing flags on attachment: 281146

Committed r202145: <http://trac.webkit.org/changeset/202145>
Comment 7 WebKit Commit Bot 2016-06-16 16:03:04 PDT
All reviewed patches have been landed.  Closing bug.