[Buildroot] [PATCH 1/1] package/dmalloc: fix strdup detection

Arnout Vandecappelle arnout at mind.be
Sun Dec 12 13:45:32 UTC 2021



On 08/12/2021 18:30, Fabrice Fontaine wrote:
> Fix the following build failure raised since bump to version 5.6.5 in
> commit 736932c71552adc4dfa95c5236d1064860900e8a:
> 
> In file included from /home/buildroot/autobuild/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/string.h:631:0,
>                   from arg_check.c:31:
> dmalloc.h:377:7: error: expected identifier or '(' before '__extension__'
>   char *strdup(const char *string);
>         ^
> 
> This build failure is raised because 0004-fix-strdup.patch was wrongly
> removed and because configure.ac wrongly assumes that strdup macro is
> not available when cross-compiling
> 
> As configure.ac can't be patched because autoreconf is not working,
> patch configure as already done in DMALLOC_POST_PATCH. An upstream patch
> on configure.ac will be sent as soon as upstream merges this old PR:
> https://github.com/j256/dmalloc/pull/44
> 
> Fixes:
>   - http://autobuild.buildroot.org/results/00565c4b0618ea5f553d8c22284637b6574e4a93
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   package/dmalloc/dmalloc.mk | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/package/dmalloc/dmalloc.mk b/package/dmalloc/dmalloc.mk
> index 05943943d6..93dc45c15d 100644
> --- a/package/dmalloc/dmalloc.mk
> +++ b/package/dmalloc/dmalloc.mk
> @@ -48,6 +48,7 @@ DMALLOC_CONF_ENV = CFLAGS="$(DMALLOC_CFLAGS)"
>   
>   define DMALLOC_POST_PATCH
>   	$(SED) 's/^ac_cv_page_size=0$$/ac_cv_page_size=12/' $(@D)/configure
> +	$(SED) 's/ac_cv_strdup_macro=no$$/ac_cv_strdup_macro=yes/' $(@D)/configure
>   	$(SED) 's/(ld -/($${LD-ld} -/' $(@D)/configure
>   	$(SED) 's/'\''ld -/"$${LD-ld}"'\'' -/' $(@D)/configure
>   	$(SED) 's/ar cr/$$(AR) cr/' $(@D)/Makefile.in
> 



More information about the buildroot mailing list