Web lists-archives.com

[RFC PATCH 4/7] config.mak.uname: NetBSD uses old iconv interface




prevents the following warning :

utf8.c: In function 'reencode_string_iconv':
utf8.c:486:28: warning: passing argument 2 of 'iconv' from incompatible pointer type [-Wincompatible-pointer-types]
   size_t cnt = iconv(conv, &cp, &insz, &outpos, &outsz);
                            ^
In file included from git-compat-util.h:275:0,
                 from utf8.c:1:
/usr/include/iconv.h:46:8: note: expected 'const char ** restrict' but argument is of type 'char **'
 size_t iconv(iconv_t, const char ** __restrict,
        ^

it is set by optional configure at least since NetBSD 6.0

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx>
---
 config.mak.uname | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config.mak.uname b/config.mak.uname
index 36c973c7e6..59ce03819b 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -246,6 +246,7 @@ ifeq ($(uname_S),NetBSD)
 	ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
 		NEEDS_LIBICONV = YesPlease
 	endif
+	OLD_ICONV = UnfortunatelyYes
 	BASIC_CFLAGS += -I/usr/pkg/include
 	BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
 	USE_ST_TIMESPEC = YesPlease
-- 
2.20.0.rc1