Re: Include missing <stdlib.h> for calloc(3) and exit(3)

Leonardo Taccari <[email protected]> Mon, 12 Jan 2026 23:17:33 +0100
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
Hello Rodrigo,

Rodrigo Arias writes:
> Hi,
>
> On Mon, Jan 12, 2026 at 11:04:07AM +0100, Leonardo Taccari wrote:
> >Hello!
> >
> >When trying to build current HEAD of dillo in NetBSD the build fails
> >with:
> >
> > [...]
> > g++ ... -o dialog.o dialog.cc
> > [...]
> > dialog.cc:38:1: note: 'calloc' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
> >    37 | #include "dlib/dlib.h"
> >   +++ |+#include <cstdlib>
> >    38 |
> > dialog.cc:192:11: error: 'exit' was not declared in this scope
> >   192 |           exit(1);
> >       |           ^~~~
> > dialog.cc:192:11: note: 'exit' is defined in header '<cstdlib>'; this is probably fixable by adding '#include <cstdlib>'
> > *** [dialog.o] Error code 1
> > [...]
> >
> >Including <stdlib.h> fixes that and the attached patch does that.
>
> Thanks!, merged in:
>
> https://git.dillo-browser.org/dillo/commit/?id=7c6ccebe61077902160798e5af46eb352ae24fdd
> [...]

Thank you very much for quickly applying it!
_______________________________________________
Dillo-dev mailing list -- dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]
To unsubscribe send an email to dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]