Commit a424a4e1 authored by Philipp Schafft's avatar Philipp Schafft 🦁

Fix win32 patches (r18642) so it builds corectly on non-win32 again.

svn path=/icecast/trunk/icecast/; revision=18646
parent 91b49c58
......@@ -34,9 +34,10 @@ AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS([alloca.h sys/timeb.h])
AC_CHECK_HEADERS([pwd.h, unistd.h, grp.h, sys/types.h])
AC_CHECK_FUNC([chuid])
AC_CHECK_FUNC([chown])
AC_CHECK_HEADERS([pwd.h unistd.h grp.h sys/types.h],,,AC_INCLUDES_DEFAULT)
AC_CHECK_FUNCS([setuid])
AC_CHECK_FUNCS([chroot])
AC_CHECK_FUNCS([chown])
dnl Checks for typedefs, structures, and compiler characteristics.
XIPH_C__FUNC__
......
......@@ -340,7 +340,7 @@ static void _server_proc(void)
static void _ch_root_uid_setup(void)
{
ice_config_t *conf = config_get_config_unlocked();
#ifdef CHUID
#ifdef HAVE_SETUID
struct passwd *user;
struct group *group;
uid_t uid=-1;
......@@ -384,7 +384,7 @@ static void _ch_root_uid_setup(void)
}
#endif
#if HAVE_CHUID
#if HAVE_SETUID
if(conf->chuid)
{
......@@ -478,7 +478,7 @@ int main(int argc, char **argv)
stats_initialize(); /* We have to do this later on because of threading */
fserve_initialize(); /* This too */
#ifdef CHUID
#ifdef HAVE_SETUID
/* We'll only have getuid() if we also have setuid(), it's reasonable to
* assume */
if(!getuid()) /* Running as root! Don't allow this */
......
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