IN order to make the code compilable with MinGW-W64 in C++, two fixes are needed.
1 - IN enet.h:5103, a void cast is required: - if (inet_ntop(AF_INET6, &address->host, name, nameLength) == NULL) {
`+ if (inet_ntop(AF_INET6, (void)&address->host, name, nameLength) == NULL) {`
Additionally, there are warnings if you compile with -Wextra, related to enum>integer conversions.
2- You need to make sure that _WIN32_WINNT >= 0x0600 #define _WIN32_WINNT 0x0600
This is because inet_ntop and inet_nton are only available since Windows Vista.
Of course, as a consequence, this library isn't compatible with Windows XP, but in 2021 this should no longer be a big problem...
Otherwise the library seem to work as well as the original ENet, both in IPv4 and IPv6. Thank you very much for this fork of ENet.
Hello,
IN order to make the code compilable with MinGW-W64 in C++, two fixes are needed.
1 - IN enet.h:5103, a void cast is required:
- if (inet_ntop(AF_INET6, &address->host, name, nameLength) == NULL) {
`+ if (inet_ntop(AF_INET6, (void)&address->host, name, nameLength) == NULL) {`
Additionally, there are warnings if you compile with -Wextra, related to enum>integer conversions.
2- You need to make sure that _WIN32_WINNT >= 0x0600
#define _WIN32_WINNT 0x0600
This is because inet_ntop and inet_nton are only available since Windows Vista. Of course, as a consequence, this library isn't compatible with Windows XP, but in 2021 this should no longer be a big problem...
Otherwise the library seem to work as well as the original ENet, both in IPv4 and IPv6. Thank you very much for this fork of ENet.