mingw compile fix / remove restrict in inet_* functions

This commit is contained in:
Benjamin Sergeant 2021-03-19 10:58:38 -07:00
parent 968cc5c1c4
commit b36a2d1faa
2 changed files with 4 additions and 4 deletions

View File

@ -8,12 +8,12 @@
// mingw does not have those
#if defined(_WIN32) && defined(__GNUC__)
const char* inet_ntop(int af, const void* restrict src, char* restrict dst, socklen_t size)
const char* inet_ntop(int af, const void* src, char* dst, socklen_t size)
{
return nullptr;
}
int inet_pton(int af, const char* restrict src, void* restrict dst)
int inet_pton(int af, const char* src, void* dst)
{
return -1;
}

View File

@ -55,8 +55,8 @@ struct pollfd
// mingw does not have those
#if defined(_WIN32) && defined(__GNUC__)
const char* inet_ntop(int af, const void* restrict src, char* restrict dst, socklen_t size);
int inet_pton(int af, const char* restrict src, void* restrict dst);
const char* inet_ntop(int af, const void* src, char* dst, socklen_t size);
int inet_pton(int af, const char* src, void* dst);
#endif
namespace ix