On 2021-04-19 19:15, Vasilij Schneidermann wrote: > I've tried installing the taglib egg on my MinGW setup today and found > that including chicken.h in C++ mode fails with "invalid conversion from > 'void*' to 'char*' [-fpermissive]". The included patch fixes this > problem.
LGTM, signoff attached. Evan
>From 9dc7525a7458a48fd0667689d80027bd8d8eefe1 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann <[email protected]> Date: Mon, 19 Apr 2021 19:11:20 +0200 Subject: [PATCH] Cast the alloca result to make C++ on MinGW happy Signed-off-by: Evan Hanson <[email protected]> --- chicken.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chicken.h b/chicken.h index 0b9c2613..7e51a38f 100644 --- a/chicken.h +++ b/chicken.h @@ -3523,7 +3523,7 @@ inline static int C_stat(const char *path, struct stat *buf) goto dircheck; if(slash && errno == ENOENT) { - C_strlcpy((str = C_alloca(len + 1)), path, len + 1); + C_strlcpy((str = (char *)C_alloca(len + 1)), path, len + 1); while(len > 1 && C_strchr("\\/", path[--len])) str[len] = '\0'; if(stat(str, buf) == 0) -- 2.29.3
