diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/main.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 9eb380471..6222f3abb 100644 --- a/configure.ac +++ b/configure.ac @@ -84,6 +84,7 @@ AC_CHECK_LIB(socket,socket,MPD_LIBS="$MPD_LIBS -lsocket",) AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",) AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",) +AC_CHECK_FUNCS(setenv) PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0, [MPD_LIBS="$MPD_LIBS $GLIB_LIBS" MPD_CFLAGS="$MPD_CFLAGS $GLIB_CFLAGS"],[echo "";echo "** ERROR:Unable to find glib-2.0 of version 2.0 or above **" ; exit 1]) diff --git a/src/main.c b/src/main.c index 944eb037a..2b76f8d9d 100644 --- a/src/main.c +++ b/src/main.c @@ -70,7 +70,7 @@ typedef struct _Options { /* * from git-1.3.0, needed for solaris */ -#ifndef setenv +#ifndef HAVE_SETENV int setenv(const char *name, const char *value, int replace) { int out; @@ -103,7 +103,7 @@ int setenv(const char *name, const char *value, int replace) return out; } -#endif +#endif /* HAVE_SETENV */ void usage(char * argv[]) { ERROR("usage:\n"); |