2023-06-06 21:44 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002815Buildsystem[All Projects] Generalpublic2021-04-14 17:29
ReporterRyan Schmidt 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
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 */

#if __DARWIN_C_LEVEL >= __DARWIN_C_FULL
...
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

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2021-04-14 17:29 Ryan Schmidt New Issue
+Issue History