From a424a4e1fe816512baf586e956bd3427223833b3 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Thu, 11 Oct 2012 00:26:38 +0000 Subject: [PATCH] Fix win32 patches (r18642) so it builds corectly on non-win32 again. svn path=/icecast/trunk/icecast/; revision=18646 --- configure.in | 7 ++++--- src/main.c | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in index e83d7b62..4ba4b688 100644 --- a/configure.in +++ b/configure.in @@ -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__ diff --git a/src/main.c b/src/main.c index 2f9abb95..3db1c424 100644 --- a/src/main.c +++ b/src/main.c @@ -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 */