Commit 8c95808d authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Borland didn't include inet_ntop() or inet_pton()

Fixes CI and nightly build.
parent 0eb0f451
Pipeline #3035 failed with stage
in 9 minutes and 55 seconds
......@@ -719,7 +719,13 @@ char* iniSetIpAddress(str_list_t* list, const char* section, const char* key, ui
char buf[128];
struct in_addr in_addr;
return iniSetString(list, section, key, inet_ntop(AF_INET, &in_addr, buf, sizeof(buf)), style);
return iniSetString(list, section, key,
#ifdef __BORLANDC__
inet_ntoa(in_addr), // deprecated function call
inet_ntop(AF_INET, &in_addr, buf, sizeof(buf)),
char* iniSetIp6Address(str_list_t* list, const char* section, const char* key, struct in6_addr value
......@@ -1633,11 +1639,16 @@ int iniGetSocketOptions(str_list_t list, const char* section, SOCKET sock
static uint32_t parseIpAddress(const char* value)
uint32_t result = 0;
uint32_t result = 0;
#ifdef __BORLANDC__
result = inet_addr(value); // deprecated function call
inet_pton(AF_INET, value, &result);
return ntohl(result);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment