1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Keep nbase compatible with old C compilers

This commit is contained in:
gio
2015-08-18 16:21:25 +00:00
parent ac5094aa5d
commit 730c9936bb

View File

@@ -913,6 +913,7 @@ char *executable_path(const char *argv0) {
int sockaddr_storage_inet_pton(const char * ip_str, struct sockaddr_storage * addr)
{
struct sockaddr_in * addrv4p = (struct sockaddr_in *) addr;
#if HAVE_IPV6
struct sockaddr_in6 * addrv6p = (struct sockaddr_in6 *) addr;
if ( 1 == inet_pton(AF_INET6, ip_str, &(addrv6p->sin6_addr)) )
@@ -922,7 +923,6 @@ int sockaddr_storage_inet_pton(const char * ip_str, struct sockaddr_storage * ad
}
#endif // HAVE_IPV6
struct sockaddr_in * addrv4p = (struct sockaddr_in *) addr;
if ( 1 == inet_pton(AF_INET, ip_str, &(addrv4p->sin_addr)) )
{
addr->ss_family = AF_INET;