Commit 634ab4ff authored by Philipp Schafft's avatar Philipp Schafft 🦁

fix warnings, mostly related to win*-builds

svn path=/icecast/trunk/icecast/; revision=19246
parent 7ae46647
...@@ -1124,7 +1124,6 @@ static void _handle_stats_request (client_t *client, char *uri) ...@@ -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) ...@@ -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)
......
...@@ -40,8 +40,10 @@ ...@@ -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"
......
...@@ -339,7 +339,7 @@ static void _server_proc(void) ...@@ -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) ...@@ -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) ...@@ -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) ...@@ -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 */
......
...@@ -604,7 +604,7 @@ void stats_event_time_iso8601 (const char *mount, const char *name) ...@@ -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);
} }
......
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