1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 02:49:01 +00:00

Cast struct ifconf.ifc_buf to (char *) to fix a compiler error on

NetBSD, where that member has type void *. Jay Fink reported the
problem.
This commit is contained in:
david
2009-08-31 18:55:57 +00:00
parent 68a9147b69
commit d99e5ec7ea
2 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
# Nmap Changelog ($Id$); -*-text-*-
o Fixed a compile error on NetBSD. It was
tcpip.cc:2948: error: pointer of type 'void *' used in arithmetic
Thanks to Jay Fink for reporting the problem and submitting a patch.
o [Zenmap] If you have any hosts or services selected, they will
remain selected after aggregating another scan or running a filter
(as long as they are still up and visible). Before the selection was

View File

@@ -3037,7 +3037,7 @@ static struct interface_info *getinterfaces_siocgifconf(int *howmany) {
ifr = ifc.ifc_req;
for (ifr = ifc.ifc_req;
ifr && ifr->ifr_name[0] && (void *) ifr < ifc.ifc_buf + ifc.ifc_len;
ifr && ifr->ifr_name[0] && (void *) ifr < (char *) ifc.ifc_buf + ifc.ifc_len;
ifr = (struct ifreq *) ((char *) ifr + len)) {
struct sockaddr_in *sin;
struct ifreq tmpifr;