Bug 30647 - Solaris build failure due to strnstr
Summary: Solaris build failure due to strnstr
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Other
: P3 Normal
Assignee: Nobody
: 31048 (view as bug list)
Depends on:
Reported: 2009-10-21 15:48 PDT by Pavel Heimlich (hajma)
Modified: 2009-11-04 16:13 PST (History)
1 user (show)

See Also:

patch (414 bytes, patch)
2009-10-21 16:26 PDT, Pavel Heimlich (hajma)
no flags Details | Formatted Diff | Diff
strnstr patch for Solaris (414 bytes, patch)
2009-11-04 01:17 PST, t.hirsch@web.de
ap: review+
ap: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Heimlich (hajma) 2009-10-21 15:48:51 PDT
Building QT4.6beta1 on OpenSolaris with Sun Studio12u1 fails with:
"websockets/WebSocketHandshake.cpp", line 255: Error: The function "strnstr" must have a prototype

strnstr is not part of the C++ standard and is not present on solaris.
Other projects test for the presence of this function and eventually reimplement it (see in Aide http://sourceforge.net/projects/aide/files/aide/0.13.1/aide-0.13.1.tar.gz/download)
Comment 1 Pavel Heimlich (hajma) 2009-10-21 16:26:39 PDT
Created attachment 41617 [details]
Comment 2 Alexey Proskuryakov 2009-11-03 20:34:29 PST
*** Bug 31048 has been marked as a duplicate of this bug. ***
Comment 3 Alexey Proskuryakov 2009-11-03 20:40:05 PST
Sorry that the patch was ignored for so long. This happened because the patch didn't have review? flag, so it wasn't visible in review queue.

The fix looks right to me.

Could you please submit the patch for review as described in <http://webkit.org/coding/contributing.html>? The change is simple, but someone needs to write a ChangeLog entry for the patch to be landed.
Comment 4 t.hirsch@web.de 2009-11-04 01:17:14 PST
Created attachment 42463 [details]
strnstr patch for Solaris

The patch adds Solaris to the platforms to use the strnstr function of StringExtras since it doesn't provide its own strnstr function. The author of the patch is Pavel Heimlich (hajma).
Comment 5 t.hirsch@web.de 2009-11-04 01:18:35 PST
Bugzilla told me, that I'm not authorized to change hajma's attachment, so I re-attached the patch once again, but now with the review flag.
Comment 6 Alexey Proskuryakov 2009-11-04 16:08:23 PST
Comment on attachment 42463 [details]
strnstr patch for Solaris

I'm taking this as a "no" to my question about ChangeLog. I'll prepare the patch for landing myself.
Comment 7 Alexey Proskuryakov 2009-11-04 16:13:26 PST
Committed <http://trac.webkit.org/changeset/50533>.