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
This commit is contained in:
parent
d6d2ca7be8
commit
3accf44add
12
src/main.c
12
src/main.c
@ -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]);
|
||||||
|
Loading…
Reference in New Issue
Block a user