| 63 | |
| 64 | #if (_WIN32_WINNT < 0x0600) |
| 65 | const char* inet_ntop(int af, const void* src, char* dst, socklen_t size) { |
| 66 | if (af != AF_INET) { |
| 67 | errno = EINVAL; |
| 68 | return 0; |
| 69 | } |
| 70 | const ui8* ia = (ui8*)src; |
| 71 | if (snprintf(dst, size, "%u.%u.%u.%u", ia[0], ia[1], ia[2], ia[3]) >= (int)size) { |
| 72 | errno = ENOSPC; |
| 73 | return 0; |
| 74 | } |
| 75 | return dst; |
| 76 | } |
| 77 | |
| 78 | struct evpair { |
| 79 | int event; |
no test coverage detected