components/nmap/patches/94.eth-dlpi.c.patch
changeset 565 39e748a05913
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/nmap/patches/94.eth-dlpi.c.patch	Thu Nov 03 10:41:43 2011 -0700
@@ -0,0 +1,21 @@
+--- nmap-5.21/libdnet-stripped/src/eth-dlpi.c	2008-09-18 23:12:25.000000000 -0700
++++ nmap-5.21/libdnet-stripped/src/eth-dlpi.c	2011-07-08 02:15:01.517564899 -0700
+@@ -120,7 +120,7 @@
+ {
+ 	union DL_primitives *dlp;
+ 	uint32_t buf[8192];
+-	char *p, dev[16];
++	char *p, dev[64];
+ 	eth_t *e;
+ 	int ppa;
+ 
+@@ -145,6 +145,9 @@
+ 	ppa = atoi(p);
+ 	*p = '\0';
+ 
++#if defined(sun) || defined(__sun) || defined(__sun)
++	snprintf(dev, sizeof(dev), "/dev/net/%s", device);
++#endif
+ 	if ((e->fd = open(dev, O_RDWR)) < 0) {
+ 		snprintf(dev, sizeof(dev), "/dev/%s", device);
+ 		if ((e->fd = open(dev, O_RDWR)) < 0)