gcc says lib/iconv.c:140: warning: passing arg 2 of `libiconv' from incompatible pointer In fact, it's a missed "const" in the cast, to match the definition of Gnu (and Solaris) iconv. Patch attached, saith the janitor (;-))
Created attachment 2872 [details] Fix for an erronious cast
Looks like this gets probably fixed in 7d32679e9683c81aca538f0267684332a28a286f prior to your bug but which eventually made Samba 4.0 via the merge. It needed to actually remove the const that was promised in sys_iconv().