WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
33903
FTBFS on GNU/kFreeBSD caused by missing strnstr() on glibc systems
https://bugs.webkit.org/show_bug.cgi?id=33903
Summary
FTBFS on GNU/kFreeBSD caused by missing strnstr() on glibc systems
Fathi Boudra
Reported
2010-01-20 07:29:28 PST
Created
attachment 47028
[details]
fix kfreebsd ftbfs While building Qt 4.6.1 on GNU/kFreeBSD, it fails to build from scratch: websockets/WebSocketHandshake.cpp: In member function ‘int WebCore::WebSocketHandshake::readServerHandshake(const char*, size_t)’: websockets/WebSocketHandshake.cpp:255: error: ‘strnstr’ was not declared in this scope it's caused by the missing strnstr() function on glibc systems. webkit trunk should be also affected as the source code found on Qt 4.6.1 is similar. Please, find attached an initial patch to fix the issue.
Attachments
fix kfreebsd ftbfs
(298 bytes, patch)
2010-01-20 07:29 PST
,
Fathi Boudra
darin
: review-
Details
Formatted Diff
Diff
Patch to use HAVE_STRNSTRN
(1.96 KB, patch)
2010-10-21 12:54 PDT
,
Anton Faern
darin
: review-
darin
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2010-01-20 08:32:59 PST
Comment on
attachment 47028
[details]
fix kfreebsd ftbfs Platforms that happen to have glibc are not OS(LINUX) and just because that's handy at one particular call site does not mean this is the correct way to do it. The right way to do this is to change the check at the strnstr definition, perhaps as described in the FIXME in StringExtras.h. Maciej Stachowiak is working on rationalizing Platform.h and might have a suggestion on the correct way to handle this.
Darin Adler
Comment 2
2010-01-20 08:33:08 PST
Also, patches need a change log entry.
Fathi Boudra
Comment 3
2010-01-20 08:43:27 PST
that's what I mean by "initial" patch :) I'm just waiting someone points me the way to go for a proper fix.
Anton Faern
Comment 4
2010-10-21 12:54:59 PDT
Created
attachment 71477
[details]
Patch to use HAVE_STRNSTRN
Anton Faern
Comment 5
2010-10-21 12:56:14 PDT
Proposed patch addresses the above and will help other affected platforms (like NetBSD) whose libc implementations lack strnstr.
Darin Adler
Comment 6
2010-10-21 12:57:14 PDT
Comment on
attachment 71477
[details]
Patch to use HAVE_STRNSTRN This patch will break non-configure-based platforms that have strnstr, which is the majority of platforms we support. Platform.h needs to set HAVE_STRNSTR for those platforms.
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