[Webkit-unassigned] [Bug 31048] New: strnstr not available on Solaris

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 3 01:15:36 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31048

           Summary: strnstr not available on Solaris
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Other
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: t.hirsch at web.de


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)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list