WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 30647
31048
strnstr not available on Solaris
https://bugs.webkit.org/show_bug.cgi?id=31048
Summary
strnstr not available on Solaris
t.hirsch@web.de
Reported
2009-11-03 01:15:36 PST
In the file WebCore/websockets/WebSocketHandshake.cpp in line 255 you make use of strnstr(), which is not available on Solaris. If you can avoid it, WebKit would compile on Solaris. Here's a suggestion for a patch, but I'm not sure if strstr() really does the same thing as strnstr() was doing before. diff --git a/src/3rdparty/webkit/WebCore/websockets/WebSocketHandshake.cpp b/src/3rdparty/webkit/WebCore/websockets/W index 691fa1c..1974f68 100644 --- a/src/3rdparty/webkit/WebCore/websockets/WebSocketHandshake.cpp +++ b/src/3rdparty/webkit/WebCore/websockets/WebSocketHandshake.cpp @@ -252,7 +252,7 @@ int WebSocketHandshake::readServerHandshake(const char* header, size_t len) p += sizeof(webSocketConnectionHeader) - 1; } - if (!strnstr(p, "\r\n\r\n", end - p)) { + if (!strstr(p, "\r\n\r\n")) { // Just hasn't been received fully yet. return -1; } (this diff was taken in the WebKit version that comes in Qt)
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2009-11-03 20:34:29 PST
This is not the right fix for the problem. We have a portable implementation of strnstr in wtf/StringExtras.h, so what needs to be done is adding Solaris to an #if guarding the implementation. Please submit patches for review as described in <
http://webkit.org/coding/contributing.html
> (in this particular case, we actually already have a patch submitted, but it was overlooked, because the contributor failed to set review? flag). *** This bug has been marked as a duplicate of
bug 30647
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug