cvs commit: patches/tcptraceroute tcptraceroute-1.4-gcc33-1.patch

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Wed Oct 29 20:08:33 PST 2003


tushar      03/10/29 21:08:33

  Added:       tcptraceroute tcptraceroute-1.4-gcc33-1.patch
  Log:
  Added Patch: tcptraceroute-1.4-gcc33-1
  
  Revision  Changes    Path
  1.1                  patches/tcptraceroute/tcptraceroute-1.4-gcc33-1.patch
  
  Index: tcptraceroute-1.4-gcc33-1.patch
  ===================================================================
  Submitted By: Jeremy Utley <jeremy at linuxfromscratch.org>
  Date: 2003-10-29
  Origin: Gentoo tcptraceroute Ebuild
  Description: Fixes syntax errors with GCC 3.3.x in tcptraceroute.c
  
  diff -Naur tcptraceroute-1.4-old/tcptraceroute.c tcptraceroute-1.4/tcptraceroute.c
  --- tcptraceroute-1.4-old/tcptraceroute.c	2002-07-30 21:51:27.000000000 +0000
  +++ tcptraceroute-1.4/tcptraceroute.c	2003-10-30 02:05:11.000000000 +0000
  @@ -391,10 +391,10 @@
   void usage(void)
   {
   	printf("\n%s\n%s\n", VERSION, BANNER);
  -    fatal("Usage: %s [-nNFSAE] [-i <interface>] [-f <first ttl>]
  -       [-l <packet length>] [-q <number of queries>] [-t <tos>]
  -       [-m <max ttl>] [-pP] <source port>] [-s <source address>]
  -       [-w <wait time>] <host> [destination port] [packet length]\n\n", name);
  +    fatal("Usage: %s [-nNFSAE] [-i <interface>] [-f <first ttl>]\n"\
  +"       [-l <packet length>] [-q <number of queries>] [-t <tos>]\n"\
  +"       [-m <max ttl>] [-pP] <source port>] [-s <source address>]\n"\
  +"       [-w <wait time>] <host> [destination port] [packet length]\n\n", name);
   }
   
   void about(void)
  @@ -1182,9 +1182,9 @@
   	if (! (pcap = pcap_open_live(device, offset + SNAPLEN, 0, 10, errbuf)))
   		fatal("pcap_open_live failed: %s", errbuf);
   
  -	safe_snprintf(filter, TEXTSIZE, "
  -		(tcp and src host %s and src port %d and dst host %s)
  -		or ((icmp[0] == 11 or icmp[0] == 3) and dst host %s)",
  +	safe_snprintf(filter, TEXTSIZE, \
  +"		(tcp and src host %s and src port %d and dst host %s)\n"\
  +"		or ((icmp[0] == 11 or icmp[0] == 3) and dst host %s)",
   			iptos(dst_ip), dst_prt, iptos(src_ip), iptos(src_ip));
   
   	if (o_nofilter)
  @@ -2003,6 +2003,6 @@
   
   	defaults();
   	initcapture();
  -	seteuid(getuid());
  +	setuid(getuid());
   	return trace();
   }
  
  
  



More information about the patches mailing list