]> git.meshlink.io Git - catta/blob - src/compat/windows/wincompat.c
add uname and socklen_t to windows compat layer
[catta] / src / compat / windows / wincompat.c
1 #include "wincompat.h"
2 #include <errno.h>
3
4 int uname(struct utsname *buf)
5 {
6     memset(buf, 0, sizeof(struct utsname));
7     strncpy(buf->sysname, "Windows", sizeof(buf->sysname)-1);
8     if(GetComputerName(buf->nodename, sizeof(buf->nodename)-1) == 0) {
9         errno = EFAULT;
10         return -1;
11     }
12
13     return 0;
14 }