Provide setenv/unsetenv for environments lacking them. Bug 1578
[exim.git] / src / src / tls.c
index a3658276fcca5bd13d58dc04f17fce470ef95e90..5958dfc1c115648beec667046c801847e5ece08c 100644 (file)
@@ -84,22 +84,26 @@ return TRUE;
 *        Timezone environment flipping           *
 *************************************************/
 
+#ifdef MISSING_UNSETENV_3
+# include "setenv.c"
+#endif
+
 static uschar *
 to_tz(uschar * tz)
 {
   uschar * old = US getenv("TZ");
-  setenv("TZ", CS tz, 1);
-  tzset();
+  (void) setenv("TZ", CCS tz, 1);
+  tzset(); 
   return old;
 }
 static void
 restore_tz(uschar * tz)
 {
   if (tz)
-    setenv("TZ", CS tz, 1);
+    (void) setenv("TZ", CCS tz, 1);
   else
-    unsetenv("TZ");
-  tzset();
+    (void) unsetenv("TZ");
+  tzset(); 
 }
 
 /*************************************************