freebsd-ports/www/gatling/files/patch-smb.c
Vanilla I. Shu b5d8f94cc7 - Take maintainership
- Stage
- Fix some gcc warnings
- Add LICENSE
- Define OPTIONS for DOC, EXAMPLES and DEBUG
- Silence pre-install and do-install

PR:		ports/192619
Submitted by:	Marco Steinbach [coco (executive-computing.de)]
2014-08-13 03:15:31 +00:00

14 lines
419 B
C

--- smb.c.orig 2014-08-12 18:48:53.000000000 +0200
+++ smb.c 2014-08-12 18:49:02.000000000 +0200
@@ -511,7 +511,11 @@
X=ssize;
Y=dsize?dsize-1:dsize; // the -1 makes sure we have a 0 byte at the end
memset(dest,0,dsize);
+#if defined(__sun__) || defined(__FreeBSD__)
+ if (iconv(wc2utf8,(const char**)&x,&X,&y,&Y)) return 0;
+#else
if (iconv(wc2utf8,&x,&X,&y,&Y)) return 0;
+#endif
return dsize-Y;
}