Commit 3accf44a authored by Avuton Olrich's avatar Avuton Olrich

Solaris is reported to not have a setenv() thus

breaking compilation. This fixes that problem with a macro that emulates setenv() with putenv(). git-svn-id: https://svn.musicpd.org/mpd/trunk@4097 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent d6d2ca7b
...@@ -67,6 +67,18 @@ typedef struct _Options { ...@@ -67,6 +67,18 @@ typedef struct _Options {
int updateDB; int updateDB;
} Options; } Options;
/* Solaris has been reported to have no setenv
* putenv() will automatically overwrite, so
* the overwrite macro will go unused
*/
#ifndef setenv
#define setenv(name,value,overwrite) { \
char * tmp = NULL; \
sprintf(tmp,"%s=%s",name,value); \
putenv(tmp); \
}
#endif /* setenv */
void usage(char * argv[]) { void usage(char * argv[]) {
ERROR("usage:\n"); ERROR("usage:\n");
ERROR(" %s [options] <conf file>\n",argv[0]); ERROR(" %s [options] <conf file>\n",argv[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment