main: put #ifdef inside winsock_init()
This way, the function call in the main() function does not need another pair of #ifdef/#endif.
This commit is contained in:
parent
a153f21315
commit
0107ef2aad
|
@ -185,9 +185,9 @@ glue_state_file_init(void)
|
||||||
/**
|
/**
|
||||||
* Windows-only initialization of the Winsock2 library.
|
* Windows-only initialization of the Winsock2 library.
|
||||||
*/
|
*/
|
||||||
#ifdef WIN32
|
|
||||||
static void winsock_init(void)
|
static void winsock_init(void)
|
||||||
{
|
{
|
||||||
|
#ifdef WIN32
|
||||||
WSADATA sockinfo;
|
WSADATA sockinfo;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
|
@ -203,9 +203,8 @@ static void winsock_init(void)
|
||||||
g_error("We use Winsock2 but your version is either too new or "
|
g_error("We use Winsock2 but your version is either too new or "
|
||||||
"old; please install Winsock 2.x\n");
|
"old; please install Winsock 2.x\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the decoder and player core, including the music pipe.
|
* Initialize the decoder and player core, including the music pipe.
|
||||||
|
@ -288,9 +287,7 @@ int main(int argc, char *argv[])
|
||||||
/* enable GLib's thread safety code */
|
/* enable GLib's thread safety code */
|
||||||
g_thread_init(NULL);
|
g_thread_init(NULL);
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
winsock_init();
|
winsock_init();
|
||||||
#endif
|
|
||||||
idle_init();
|
idle_init();
|
||||||
dirvec_init();
|
dirvec_init();
|
||||||
songvec_init();
|
songvec_init();
|
||||||
|
|
Loading…
Reference in New Issue