> Date: Thu, 19 Feb 2026 16:34:14 +0100
> From: Patrice Dumas <[email protected]>
> Cc: Gavin Smith <[email protected]>, [email protected]
> 
> > I tried including <string.h>, but that didn't help, although the
> > Gnulib version of strndup is compiled and I see it in libgnu.a, and it
> > seems to be declared in Gnulib's string.h.  Not sure what am I missing
> > here.  Any ideas?
> 
> The convert/call_html_perl_function.c file is not compiled with Gnulib
> headers, as it is compiled with Perl headers and they are incompatible.
> Accordingly, there is no #include <config.h>.  However, adding <string.h>
> is supposed to work and is included in other similar files such as
> tta/C/main/build_perl_info.c, so why including <string.h> does not help
> eludes me.

Because MinGW doesn't have strndup, so the system headers don't define
its prototype.  Which Perl header file declares strndup?  I searched
all of the header files in the Perl tree, and didn't find any that
declared strndup.

But if this file links against Gnulib's libgnu.a, why doesn't it
include the Gnulib headers?  That's inconsistent, no?

> Something that comes to me is that the libc includes are
> before the Perl includes, before the comment /* Avoid namespace conflicts. */
> maybe you added the include later on, and it could matter?

No, I added it before that.

Reply via email to