| Summary: | Fix a Tools/MiniBrowser build failure due to missing stdlib.h header file include statement | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Guido Trentalancia <guido2022> | ||||
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Local Build | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Attachments: |
|
||||||
Created attachment 467698 [details] Proposed patch to fix the build failure The latest version of WebKit 2.42.0 fails to build Tools/MiniBrowser/gtk/main.c due to a missing libc stdlib.h header file. A patch is proposed to add the stdlib.h header file needed by the exit() libc function and fix such build failure. Here is the build error produced: /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c: In function ‘parseFeaturesOptionCallback’: /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c:287:9: warning: implicit declaration of function ‘exit’ [-Wimplicit-function-declaration] 287 | exit(EXIT_SUCCESS); | ^~~~ /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c:44:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ 43 | #include <gst/gst.h> +++ |+#include <stdlib.h> 44 | #endif /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c:287:9: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch] 287 | exit(EXIT_SUCCESS); | ^~~~ /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c:287:9: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’ /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c:287:14: error: ‘EXIT_SUCCESS’ undeclared (first use in this function) 287 | exit(EXIT_SUCCESS); | ^~~~~~~~~~~~ /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c:287:14: note: ‘EXIT_SUCCESS’ is defined in header ‘<stdlib.h>’; did you forget to ‘#include <stdlib.h>’? /home/guido/tmp-new/webkitgtk-2.42.0/Tools/MiniBrowser/gtk/main.c:287:14: note: each undeclared identifier is reported only once for each function it appears in make[2]: *** [Tools/MiniBrowser/gtk/CMakeFiles/MiniBrowser.dir/build.make:182: Tools/MiniBrowser/gtk/CMakeFiles/MiniBrowser.dir/main.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:2067: Tools/MiniBrowser/gtk/CMakeFiles/MiniBrowser.dir/all] Error 2 make: *** [Makefile:156: all] Error 2