1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2025-02-02 15:07:36 -05:00

fix warnings, mostly related to win*-builds

svn path=/icecast/trunk/icecast/; revision=19246
This commit is contained in:
Philipp Schafft 2014-10-18 16:25:29 +00:00
parent 7ae4664780
commit 634ab4ffc2
4 changed files with 8 additions and 5 deletions

View File

@ -1124,7 +1124,6 @@ static void _handle_stats_request (client_t *client, char *uri)
static void _handle_get_request (client_t *client, char *passed_uri) static void _handle_get_request (client_t *client, char *passed_uri)
{ {
int port;
char *serverhost = NULL; char *serverhost = NULL;
int serverport = 0; int serverport = 0;
aliases *alias; aliases *alias;
@ -1133,7 +1132,6 @@ static void _handle_get_request (client_t *client, char *passed_uri)
listener_t *listen_sock; listener_t *listen_sock;
config = config_get_config(); config = config_get_config();
port = config->port;
listen_sock = config_get_listen_sock (config, client->con); listen_sock = config_get_listen_sock (config, client->con);
if (listen_sock) if (listen_sock)

View File

@ -40,8 +40,10 @@
#define PRI_OFF_T "ld" #define PRI_OFF_T "ld"
#define snprintf _snprintf #define snprintf _snprintf
#define strncasecmp _strnicmp #define strncasecmp _strnicmp
#ifndef S_ISREG
#define S_ISREG(mode) ((mode) & _S_IFREG) #define S_ISREG(mode) ((mode) & _S_IFREG)
#endif #endif
#endif
#include "thread/thread.h" #include "thread/thread.h"
#include "avl/avl.h" #include "avl/avl.h"

View File

@ -339,7 +339,7 @@ static void _server_proc(void)
/* chroot the process. Watch out - we need to do this before starting other /* chroot the process. Watch out - we need to do this before starting other
* threads. Change uid as well, after figuring out uid _first_ */ * threads. Change uid as well, after figuring out uid _first_ */
#if defined(HAVE_SETUID) || defined(HAVE_CHROOT) || defined(HAVE_SETUID)
static void _ch_root_uid_setup(void) static void _ch_root_uid_setup(void)
{ {
ice_config_t *conf = config_get_config_unlocked(); ice_config_t *conf = config_get_config_unlocked();
@ -387,8 +387,8 @@ static void _ch_root_uid_setup(void)
} }
#endif #endif
#if HAVE_SETUID
#if HAVE_SETUID
if(conf->chuid) if(conf->chuid)
{ {
if(getuid()) /* root check */ if(getuid()) /* root check */
@ -414,6 +414,7 @@ static void _ch_root_uid_setup(void)
} }
#endif #endif
} }
#endif
#ifdef WIN32_SERVICE #ifdef WIN32_SERVICE
int mainService(int argc, char **argv) int mainService(int argc, char **argv)
@ -477,7 +478,9 @@ int main(int argc, char **argv)
return 1; return 1;
} }
#if defined(HAVE_SETUID) || defined(HAVE_CHROOT) || defined(HAVE_SETUID)
_ch_root_uid_setup(); /* Change user id and root if requested/possible */ _ch_root_uid_setup(); /* Change user id and root if requested/possible */
#endif
stats_initialize(); /* We have to do this later on because of threading */ stats_initialize(); /* We have to do this later on because of threading */
fserve_initialize(); /* This too */ fserve_initialize(); /* This too */

View File

@ -604,7 +604,7 @@ void stats_event_time_iso8601 (const char *mount, const char *name)
char buffer[100]; char buffer[100];
localtime_r (&now, &local); localtime_r (&now, &local);
strftime (buffer, sizeof (buffer), "%FT%T%z", &local); strftime (buffer, sizeof (buffer), "%Y-%m-%dT%H:%M:%S%z", &local);
stats_event (mount, name, buffer); stats_event (mount, name, buffer);
} }