Bug 30647

Summary: Solaris build failure due to strnstr
Product: WebKit Reporter: Pavel Heimlich (hajma) <tropikhajma>
Component: Web Template FrameworkAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: t.hirsch
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Other   
Attachments:
Description Flags
patch
none
strnstr patch for Solaris ap: review+, ap: commit-queue-

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]
patch
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>.