From e34e25d907ee92063fd2466a1634b961e292cc0f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 4 Oct 1998 15:54:04 +0000 Subject: more solaris 2.5 fixups. It now seems to be working pretty well. (This used to be commit c4e450817886b40474cebdfc50c0c16fb4646baf) --- source3/lib/replace.c | 18 ++++++++++++++++++ source3/lib/util.c | 1 + 2 files changed, 19 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/replace.c b/source3/lib/replace.c index 6441efe44c..948dfdf9c8 100644 --- a/source3/lib/replace.c +++ b/source3/lib/replace.c @@ -293,3 +293,21 @@ char *rep_inet_ntoa(struct in_addr ip) return buf; } #endif + + +#ifndef HAVE_SETENV +/***************************************************************** +set an env variable - some systems don't have this +*****************************************************************/ + int setenv(const char *name, const char *value, int overwrite) +{ + pstring s; + + if (!overwrite && getenv(name)) return 0; + + slprintf(s,sizeof(s)-1,"%s=%s", name, value); + + return putenv(s); +} + +#endif diff --git a/source3/lib/util.c b/source3/lib/util.c index c36eb8a667..38cde624d4 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -4844,3 +4844,4 @@ void zero_free(void *p, size_t size) memset(p, 0, size); free(p); } + -- cgit