Bug 128597

Summary: need to #include <libgen.h> for basename
Product: WebKit Reporter: Allison Lortie (desrt) <desrt>
Component: WebKit Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: berto, cgarcia, commit-queue, landry
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 128598    
Attachments:
Description Flags
Be sure to #include <libgen.h> for basename
none
Patch
none
Patch none

Description Allison Lortie (desrt) 2014-02-11 05:57:26 PST
Created attachment 223845 [details]
Be sure to #include <libgen.h> for basename

Source/WebKit2/PluginProcess/unix/PluginProcessMainUnix.cpp uses basename() but does not #include <libgen.h>

according to POSIX, this is the correct header to use (and even the Linux manpages agree):

http://pubs.opengroup.org/onlinepubs/007908775/xsh/libgen.h.html
Comment 1 Landry Breuil 2014-02-17 11:39:55 PST
Same issue on OpenBSD, fixed by http://www.openbsd.org/cgi-bin/cvsweb/ports/www/webkit/patches/patch-Source_WebKit2_PluginProcess_unix_PluginProcessMainUnix_cpp?rev=1.1

Dunno if the #include has to be os-specific...
Comment 2 Allison Lortie (desrt) 2014-02-17 11:46:01 PST
The header is POSIX-specified, so it should definitely not be made OS-specific.
Comment 3 Alexey Proskuryakov 2014-02-24 11:06:57 PST
Comment on attachment 223845 [details]
Be sure to #include <libgen.h> for basename

Please add a ChangeLog, as described at <http://www.webkit.org/coding/contributing.html>.

Either you or someone else has to make a ChangeLog entry for landing.
Comment 4 Allison Lortie (desrt) 2014-02-24 13:20:26 PST
Created attachment 225088 [details]
Patch
Comment 5 Alberto Garcia 2014-02-27 05:05:57 PST
(In reply to comment #4)
> Created an attachment (id=225088) [details]
> Patch

Yeah, thinks looks good, thanks a lot!
Comment 6 Allison Lortie (desrt) 2014-02-27 05:18:45 PST
Created attachment 225359 [details]
Patch
Comment 7 WebKit Commit Bot 2014-02-27 05:53:30 PST
Comment on attachment 225359 [details]
Patch

Clearing flags on attachment: 225359

Committed r164797: <http://trac.webkit.org/changeset/164797>
Comment 8 WebKit Commit Bot 2014-02-27 05:53:32 PST
All reviewed patches have been landed.  Closing bug.