[Webkit-unassigned] [Bug 261638] New: Fix a Tools/MiniBrowser build failure due to missing stdlib.h header file include statement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 16 03:23:38 PDT 2023


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

            Bug ID: 261638
           Summary: Fix a Tools/MiniBrowser build failure due to missing
                    stdlib.h header file include statement
           Product: WebKit
           Version: WebKit Local Build
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: guido2022 at trentalancia.com

Created attachment 467698

  --> https://bugs.webkit.org/attachment.cgi?id=467698&action=review

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230916/dc9ae935/attachment.htm>


More information about the webkit-unassigned mailing list