File: 02-fix-gcc4.diff

package info (click to toggle)
sendip 2.6-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 484 kB
  • sloc: ansic: 3,737; perl: 321; makefile: 55; sh: 13
file content (71 lines) | stat: -rw-r--r-- 1,769 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--- sendip-2.5.orig/ipv4.c
+++ sendip-2.5/ipv4.c
@@ -209,8 +209,8 @@
 				fprintf(stderr,"Out of memory!\n");
 				return FALSE;
 			}
-			sprintf(data,"0x%s",arg);
-			len = compact_string(data);
+			sprintf((char*)data,"0x%s",arg);
+			len = compact_string((char*)data);
 			cp=(*data&0x80)>>7;
 			cls=(*data&0x60)>>5;
 			num=(*data&0x1F);
@@ -237,7 +237,7 @@
 				free(data);
 				return FALSE;
 			} else {
-				addoption(0,0,7,len+2,data,pack);
+				addoption(0,0,7,len+2,(unsigned char*)data,pack);
 				free(data);
 			}
 		} else if(!strcmp(opt+2, "ts")) {
@@ -352,7 +352,7 @@
 				data_in = next;
 			}
 
-			addoption(0,2,4,data_out-data+2,data,pack);
+			addoption(0,2,4,data_out-data+2,(unsigned char*)data,pack);
 			free(data);
 			/* End of timestamp parsing */
 
@@ -377,7 +377,7 @@
 				free(data);
 				return FALSE;
 			} else {
-				addoption(1,0,3,len+2,data,pack);
+				addoption(1,0,3,len+2,(unsigned char*)data,pack);
 				free(data);
 			}
 		} else if(!strcmp(opt+2, "sid")) {
@@ -399,7 +399,7 @@
 				free(data);
 				return FALSE;
 			} else {
-				addoption(1,0,9,len+2,data,pack);
+				addoption(1,0,9,len+2,(unsigned char*)data,pack);
 				free(data);
 			}
 		} else {
--- sendip-2.5.orig/tcp.c
+++ sendip-2.5/tcp.c
@@ -204,8 +204,8 @@
 				fprintf(stderr,"Out of memory!\n");
 				return FALSE;
 			}
-			sprintf(data,"0x%s",arg);
-			len = compact_string(data);
+			sprintf((char*)data,"0x%s",arg);
+			len = compact_string((char*)data);
 			if(len==1)
 				addoption(*data,1,NULL,pack);
 			else
@@ -230,7 +230,7 @@
 			addoption(4,2,NULL,pack);
 		} else if (!strcmp(opt+2, "sack")) {
 		   /* Selective Acknowledge rfc1323 */
-			unsigned char *next;
+			char *next;
 			u_int32_t le, re;
 			u_int8_t *comb, *c;
 			int count=0;