]> git.meshlink.io Git - catta/blob - src/compat/windows/wincompat.h
add uname and socklen_t to windows compat layer
[catta] / src / compat / windows / wincompat.h
1 #ifndef foowincompatfoo
2 #define foowincompatfoo
3
4 #undef WINVER
5 #undef _WIN32_WINNT
6
7 #define WINVER 0x0600       // Vista
8 #define _WIN32_WINNT WINVER
9
10 #include <winsock2.h>
11 #include <ws2tcpip.h>
12
13
14 typedef int socklen_t;
15
16
17 struct utsname {
18    char sysname[9];    /* Operating system name (e.g., "Linux") */
19    char nodename[MAX_COMPUTERNAME_LENGTH+1];
20                        /* Name within "some implementation-defined network" */
21    char release[9];    /* Operating system release (e.g., "2.6.28") */
22    char version[9];    /* Operating system version */
23    char machine[9];    /* Hardware identifier */
24 };
25
26 int uname(struct utsname *buf);
27
28
29 #endif