In S3 we put a talloc_pool on top of the stack so that an allocation from
talloc_tos() normally is just a pointer increment.
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 31 09:14:01 CEST 2011 on sn-devel-104
#ifndef SMB_ICONV_BUFSIZE
#define SMB_ICONV_BUFSIZE 2048
#endif
+ TALLOC_CTX *mem_ctx;
size_t bufsize;
- char *cvtbuf = talloc_array(cd, char, SMB_ICONV_BUFSIZE);
+ char *cvtbuf;
+
+#if _SAMBA_BUILD_ == 3
+ mem_ctx = talloc_tos();
+#else
+ mem_ctx = cd;
+#endif
+ cvtbuf = talloc_array(mem_ctx, char, SMB_ICONV_BUFSIZE);
if (!cvtbuf) {
return (size_t)-1;