Index: src/compat_misc.c =================================================================== --- src/compat_misc.c (revision 18827) +++ src/compat_misc.c (revision 18828) @@ -33,6 +33,7 @@ #include #include #include +#include #include "compat_misc.h" /* On some old systems random() works better than rand(). Unfortunately @@ -174,7 +175,19 @@ #ifdef PCB_HAVE_SETENV return setenv(name, val, overwrite); #else +# ifdef PCB_HAVE_PUTENV + int res; + gds_t tmp; + gds_init(&tmp); + gds_append_str(&tmp, name); + gds_append(&tmp, '='); + gds_append_str(&tmp, val); + res = putenv(tmp.array); + gds_uninit(&tmp); + return res; +# else return -1; +# endif #endif }