2024-04-12 16:31 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002815Buildsystem[All Projects] Generalpublic2024-01-02 04:31
ReporterRyan Carsten Schmidt 
Assigned To 
Platformx86_64OSmacOSOS Version10.13.6
Summary0002815: implicit declaration of function 'strcasestr' is invalid in C99
DescriptionTrying to build NetSurf 3.10 on macOS 10.13.6 (with -Werror=implicit-function-declaration in CFLAGS, in order to simulate what happens by default with newer versions of Xcode clang) with the gtk3 target failed as follows:

content/handlers/html/css.c:229:7: error: implicit declaration of function 'strcasestr' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

In /usr/include/string.h, strcasestr is declared within a conditional:

/* Darwin extensions */

char *strcasestr(const char *__big, const char *__little);

I worked around the problem by adding -D_DARWIN_C_SOURCE to CFLAGS, similar to the way that you already use -D_BSD_SOURCE, -D_DEFAULT_SOURCE, and -D_NETBSD_SOURCE in frontends/gtk/Makefile.
Steps To ReproduceBuild NetSurf 3.10 on any version of macOS with -Werror=implicit-function-declaration in CFLAGS.
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #
Attached Files


Ryan Carsten Schmidt


Ryan Carsten Schmidt (reporter)

This problem remains in NetSurf 3.11.

-Issue History
Date Modified Username Field Change
2021-04-14 17:29 Ryan Carsten Schmidt New Issue
2024-01-02 04:31 Ryan Carsten Schmidt Note Added: 0002429
+Issue History