[84067] trunk/dports/net/nsping

ryandesign at macports.org ryandesign at macports.org
Thu Sep 15 21:03:14 PDT 2011


Revision: 84067
          http://trac.macports.org/changeset/84067
Author:   ryandesign at macports.org
Date:     2011-09-15 21:03:14 -0700 (Thu, 15 Sep 2011)
Log Message:
-----------
nsping: avoid conflict with built-in dprintf on Lion; see #30960

Modified Paths:
--------------
    trunk/dports/net/nsping/Portfile

Added Paths:
-----------
    trunk/dports/net/nsping/files/
    trunk/dports/net/nsping/files/patch-dprintf.diff

Modified: trunk/dports/net/nsping/Portfile
===================================================================
--- trunk/dports/net/nsping/Portfile	2011-09-16 03:57:25 UTC (rev 84066)
+++ trunk/dports/net/nsping/Portfile	2011-09-16 04:03:14 UTC (rev 84067)
@@ -20,6 +20,9 @@
 
 checksums               md5 64785a50eb065a9b28ee33ec8c1ccab2
 extract.post_args       | gnutar -x
+
+patchfiles              patch-dprintf.diff
+
 use_configure           no
 
 variant universal {}

Added: trunk/dports/net/nsping/files/patch-dprintf.diff
===================================================================
--- trunk/dports/net/nsping/files/patch-dprintf.diff	                        (rev 0)
+++ trunk/dports/net/nsping/files/patch-dprintf.diff	2011-09-16 04:03:14 UTC (rev 84067)
@@ -0,0 +1,54 @@
+--- nsping.c.orig	1997-11-26 02:11:39.000000000 -0600
++++ nsping.c	2011-09-15 22:58:32.000000000 -0500
+@@ -379,19 +379,19 @@
+ 		/* descriminate real responses from spurious crud */
+ 
+ 		if(si.sin_addr.s_addr != Target_Address) {
+-			dprintf("Received packet from unexpected address %s.\n",
++			ddprintf("Received packet from unexpected address %s.\n",
+ 				inet_ntoa(si.sin_addr));
+ 			continue;
+ 		}
+ 
+ 		if(si.sin_port != htons(Target_Port)) {
+-			dprintf("Received packet from unexpected port %d.\n",
++			ddprintf("Received packet from unexpected port %d.\n",
+ 				ntohs(si.sin_port));
+ 			continue;
+ 		}
+ 
+ 		if(l < sizeof(HEADER)) {
+-			dprintf("Short packet.\n");
++			ddprintf("Short packet.\n");
+ 			continue;
+ 		}
+ 		
+@@ -431,7 +431,7 @@
+ 			break;
+ 
+ 	if(i == QUERY_BACKLOG) {
+-		dprintf("Packet with id %d not ours.\n", ntohs(hp->id));
++		ddprintf("Packet with id %d not ours.\n", ntohs(hp->id));
+ 		return;
+ 	} else 
+ 		Queries[i].found = 1;	
+@@ -610,7 +610,7 @@
+ 
+ /* don't print if we're not in debug mode */
+ 
+-void dprintf(char *fmt, ...) {
++void ddprintf(char *fmt, ...) {
+ 	va_list ap;
+ 
+ 	if(!Debug)
+--- nsping.h.orig	1997-11-24 03:47:25.000000000 -0600
++++ nsping.h	2011-09-15 22:58:21.000000000 -0500
+@@ -42,7 +42,7 @@
+ struct timeval *timeval_subtract(struct timeval *out, struct timeval *in);
+ char *addr_string(u_int32_t address);
+ int bind_udp_socket(u_int32_t address, u_int16_t port);
+-void dprintf(char *fmt, ...);
++void ddprintf(char *fmt, ...);
+ void usage(void);
+ char *xstrdup(char *v);
+ u_int32_t resolve(char *name);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110915/529e49aa/attachment.html>


More information about the macports-changes mailing list