Bug 128597 - need to #include <libgen.h> for basename
Summary: need to #include <libgen.h> for basename
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Depends on:
Blocks: 128598
  Show dependency treegraph
Reported: 2014-02-11 05:57 PST by Allison Lortie (desrt)
Modified: 2014-02-27 05:53 PST (History)
4 users (show)

See Also:

Be sure to #include <libgen.h> for basename (827 bytes, patch)
2014-02-11 05:57 PST, Allison Lortie (desrt)
no flags Details | Formatted Diff | Diff
Patch (1.14 KB, patch)
2014-02-24 13:20 PST, Allison Lortie (desrt)
no flags Details | Formatted Diff | Diff
Patch (1.21 KB, patch)
2014-02-27 05:18 PST, Allison Lortie (desrt)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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):

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]
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]
Comment 7 WebKit Commit Bot 2014-02-27 05:53:30 PST
Comment on attachment 225359 [details]

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.