Package: sendip
Severity: minor
Usertags: clang-ftbfs
User: [email protected]
Tag: patch


Hello,

Using the rebuild infrastructure, your package fails to build with clang
(instead of gcc).

Thanks,
Arthur
diff -Naur sendip.orig/sendip-2.5/debian/changelog sendip/sendip-2.5/debian/changelog
--- sendip.orig/sendip-2.5/debian/changelog	2014-07-05 11:38:45.768759838 -0500
+++ sendip/sendip-2.5/debian/changelog	2014-07-05 11:46:07.236018502 -0500
@@ -1,3 +1,12 @@
+sendip (2.5-6) unstable; urgency=low
+
+  * Fix FTBFS with clang
+    - Fixed the "empty while() body" in
+      rip.c
+      ripng.c
+
+ -- Arthur Marble <[email protected]>  Sat, 05 Jul 2014 11:46:07 -0500
+
 sendip (2.5-5) unstable; urgency=low
 
   * Switch to source format 3.0 (quilt).
diff -Naur sendip.orig/sendip-2.5/debian/changelog sendip/sendip-2.5/debian/
changelog             copyright             sendip/               watch
changelog~            files                 sendip.debhelper.log  
compat                patches/              sendip.substvars      
control               rules                 source/               
arthur@ultratux:~/src/src_Work$ diff -Naur sendip.orig/sendip-2.5/debian/patches/clang-ftbfs.diff sendip/sendip-2.5/debian/patches/clang-ftbfs.diff
--- sendip.orig/sendip-2.5/debian/patches/clang-ftbfs.diff	1969-12-31 18:00:00.000000000 -0600
+++ sendip/sendip-2.5/debian/patches/clang-ftbfs.diff	2014-07-05 11:45:06.164246068 -0500
@@ -0,0 +1,82 @@
+Index: sendip-2.5/rip.c
+===================================================================
+--- sendip-2.5.orig/rip.c
++++ sendip-2.5/rip.c
+@@ -61,19 +61,36 @@ bool do_opt(char *opt, char *arg, sendip
+ 		ripopt = RIP_OPTION(pack);
+ 		p=q=arg;
+ 		/* TODO: if arg is malformed, this could segfault */
+-		while(*(q++)!=':') /* do nothing */; *(--q)='\0';
++		while(*(q++)!=':')
++			/* do nothing */;
++		*(--q)='\0';
+ 		rippack->addressFamily= htons((p==q)?2:(u_int16_t)strtoul(p, (char **)0, 0));
+ 		pack->modified |= RIP_MOD_ADDRFAM;
+-		p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
++		p=++q;
++		while(*(q++)!=':')
++			       /* do nothing */;
++		*(--q)='\0';
+ 		rippack->routeTagOrAuthenticationType=htons((p==q)?0:(u_int16_t)strtoul(p, (char **)0,0));
+ 		pack->modified |= RIP_MOD_ROUTETAG;
+-		p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
++		p=++q;
++		while(*(q++)!=':')
++			/* do nothing */;
++		*(--q)='\0';
+ 		ripopt->address=(p==q)?inet_addr("0.0.0.0"):inet_addr(p);
+-		p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
++		p=++q;
++		while(*(q++)!=':')
++			/* do nothing */;
++		*(--q)='\0';
+ 		ripopt->subnetMask=(p==q)?inet_addr("255.255.255.0"):inet_addr(p);
+-		p=++q; while(*(q++)!=':') /* do nothing */; *(--q)='\0';
++		p=++q;
++		while(*(q++)!=':')
++			/* do nothing */;
++		*(--q)='\0';
+ 		ripopt->nextHop=(p==q)?inet_addr("0.0.0.0"):inet_addr(p);
+-		p=++q; while(*(q++)!='\0') /* do nothing */; *(--q)='\0';
++		p=++q;
++		while(*(q++)!='\0')
++			/* do nothing */;
++		*(--q)='\0';
+ 		ripopt->metric=htonl((p==q)?16:(u_int32_t)strtoul(p,(char **)0, 0));
+ 		break;
+ 	case 'd': /* default request */
+Index: sendip-2.5/ripng.c
+===================================================================
+--- sendip-2.5.orig/ripng.c
++++ sendip-2.5/ripng.c
+@@ -77,16 +77,26 @@ bool do_opt(char *opt, char *arg, sendip
+ 		ripopt = RIPNG_ENTRY(pack);
+ 		p=q=arg;
+ 		/* TODO: if arg is malformed, this could segfault */
+-		while(*(q++)!='/') /* do nothing */; *(--q)='\0';
++		while(*(q++)!='/')
++			/* do nothing */;
++		*(--q)='\0';
+ 		ripopt->prefix = (p==q)?in6addr_any:inet6_addr(p);
+ 
+-		p=++q; while(*(q++)!='/') /* do nothing */; *(--q)='\0';
++		p=++q;
++		while(*(q++)!='/')
++			/* do nothing */;
++		*(--q)='\0';
+ 		ripopt->tag=htons( (p==q)?0:(u_int16_t)strtoul(p, (char **)0,0));
+ 
+-		p=++q; while(*(q++)!='/') /* do nothing */; *(--q)='\0';
++		p=++q;
++		while(*(q++)!='/')
++			/* do nothing */;
++		*(--q)='\0';
+ 		ripopt->len=(p==q)?(u_int8_t)128:(u_int8_t)strtoul(p, (char **)0,0);
+ 
+-		p=++q; while(*(q++)!='\0') /* do nothing */; *(--q)='\0';
++		p=++q;while(*(q++)!='\0')
++			      /* do nothing */;
++		*(--q)='\0';
+ 		ripopt->metric=(p==q)?(u_int8_t)16:(u_int8_t)strtoul(p,(char **)0, 0);
+ 		break;
+ 	case 'd': /* default request */
diff -Naur sendip.orig/sendip-2.5/debian/patches/series sendip/sendip-2.5/debian/patches/series 
--- sendip.orig/sendip-2.5/debian/patches/series	2014-07-05 11:38:45.768759838 -0500
+++ sendip/sendip-2.5/debian/patches/series	2014-07-05 11:38:58.361537023 -0500
@@ -2,3 +2,4 @@
 02-fix-gcc4.diff
 03-spelling-fix.diff
 04-hardening.diff
+clang-ftbfs.diff

Reply via email to