components/nmap/patches/libdnet-stripped.src.eth-dlpi.c.patch
changeset 605 8dca74ad1a27
parent 565 39e748a05913
child 1091 ce8b381f34b6
equal deleted inserted replaced
604:c25824a87b1f 605:8dca74ad1a27
       
     1 --- nmap-5.21/libdnet-stripped/src/eth-dlpi.c.~1~	2010-02-28 11:45:39.000000000 -0800
       
     2 +++ nmap-5.21/libdnet-stripped/src/eth-dlpi.c	2011-11-10 15:34:38.200529059 -0800
       
     3 @@ -134,7 +134,7 @@
       
     4  {
       
     5  	union DL_primitives *dlp;
       
     6  	uint32_t buf[8192];
       
     7 -	char *p, dev[16];
       
     8 +	char *p, dev[64];
       
     9  	eth_t *e;
       
    10  	int ppa;
       
    11  
       
    12 @@ -159,6 +159,9 @@
       
    13  	ppa = atoi(p);
       
    14  	*p = '\0';
       
    15  
       
    16 +#if defined(sun) || defined(__sun) || defined(__sun)
       
    17 +	snprintf(dev, sizeof(dev), "/dev/net/%s", device);
       
    18 +#endif
       
    19  	if ((e->fd = open(dev, O_RDWR)) < 0) {
       
    20  		snprintf(dev, sizeof(dev), "/dev/%s", device);
       
    21  		if ((e->fd = open(dev, O_RDWR)) < 0)