[PATCH] for clearenv

Jeremy Allison jra at samba.org
Fri Apr 29 18:34:35 UTC 2016


On Fri, Apr 29, 2016 at 01:30:49PM +0200, Günther Deschner wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi Volker,
> 
> This code won't compile in the non-clearenv case with:
> 
> ../source3/client/smbspool_krb5_wrapper.c: In function ‘main’:
> ../source3/client/smbspool_krb5_wrapper.c:202:2: error: ISO C90
> forbids mixed declarations and code [-Werror=declaration-after-statement
> ]
>   extern char **environ;
>   ^
> ../source3/client/smbspool_krb5_wrapper.c:203:12: error:
> ‘__ERROR_DONT_USE_CALLOC_DIRECTLY’ undeclared (first use in this functio
> n)
>   environ = calloc(1, sizeof(*environ));
> 
> Maybe we add something like the attached fix ?

Oh thanks for that Guenther, in the review I compiled
on a machines with clearenv() so didn't notice this :-(.



More information about the samba-technical mailing list