Fix compile time issues
[collectd.git] / src / daemon / cmd_windows.c
1 /**\r
2  * collectd - src/collectd_windows.c\r
3  * Copyright (C) 2017  Google LLC\r
4  *\r
5  * Permission is hereby granted, free of charge, to any person obtaining a\r
6  * copy of this software and associated documentation files (the "Software"),\r
7  * to deal in the Software without restriction, including without limitation\r
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,\r
9  * and/or sell copies of the Software, and to permit persons to whom the\r
10  * Software is furnished to do so, subject to the following conditions:\r
11  *\r
12  * The above copyright notice and this permission notice shall be included in\r
13  * all copies or substantial portions of the Software.\r
14  *\r
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\r
21  * DEALINGS IN THE SOFTWARE.\r
22  **/\r
23 \r
24 #include "cmd.h"\r
25 #include "plugin.h"\r
26 #include <stdio.h>\r
27 #include <windows.h>\r
28 \r
29 int main(int argc, char **argv) {\r
30   WSADATA wsaData;\r
31   WORD wVersionRequested = MAKEWORD(2, 2);\r
32   int err = WSAStartup(wVersionRequested, &wsaData);\r
33   if (err != 0) {\r
34     ERROR("WSAStartup failed with error: %d\n", err);\r
35     return 1;\r
36   }\r
37 \r
38   struct cmdline_config config = init_config(argc, argv);\r
39   return run_loop(config.test_readall);\r
40 }\r