net-analyzer/rain: Fix CFLAGS=-fno-common
[gentoo.git] / net-analyzer / rain / files / rain-1.2.9_beta1-fno-common.patch
1 --- a/include/rain_inet_common.h
2 +++ b/include/rain_inet_common.h
3 @@ -368,14 +368,14 @@
4  /* 
5   * global variables 
6   */
7 -u_int16_t packetsize;
8 -unsigned char      *buffer;   /* For holding packets. Declared globally to ensure it is freed when the program exits */
9 -time_t          send_start;   /* for storing start and finish time of total packets sent */
10 -time_t         send_finish;
11 -unsigned long packets_sent;
12 -u_short            verbose;
13 -struct in_addr       group;  /* for ICMP gateway and IGMP group addresses */
14 -int              sendflags;  /* stores flags for sendto(); Default is 0 */
15 +extern u_int16_t packetsize;
16 +extern unsigned char      *buffer;   /* For holding packets. Declared globally to ensure it is freed when the program exits */
17 +extern time_t          send_start;   /* for storing start and finish time of total packets sent */
18 +extern time_t         send_finish;
19 +extern unsigned long packets_sent;
20 +extern u_short            verbose;
21 +extern struct in_addr       group;  /* for ICMP gateway and IGMP group addresses */
22 +extern int              sendflags;  /* stores flags for sendto(); Default is 0 */
23  /*---------------------------*/
24  
25  
26 --- a/source/rain_inet_common.c
27 +++ b/source/rain_inet_common.c
28 @@ -17,6 +17,18 @@
29   *-------------------------------------------------*/
30  #include "rain_common.h"
31  
32 +/* 
33 + * global variables 
34 + */
35 +u_int16_t packetsize;
36 +unsigned char      *buffer;   /* For holding packets. Declared globally to ensure it is freed when the program exits */
37 +time_t          send_start;   /* for storing start and finish time of total packets sent */
38 +time_t         send_finish;
39 +unsigned long packets_sent;
40 +u_short            verbose;
41 +struct in_addr       group;  /* for ICMP gateway and IGMP group addresses */
42 +int              sendflags;  /* stores flags for sendto(); Default is 0 */
43 +/*---------------------------*/
44  
45  /*
46   * Internet checksum routine (RFC 1071) 
47 --- a/include/rain_icmp.h
48 +++ b/include/rain_icmp.h
49 @@ -20,7 +20,7 @@
50  
51  
52  
53 -unsigned char icmpinfo[56][56][56];
54 +extern unsigned char icmpinfo[56][56][56];
55  
56  
57  /* 
58 --- a/source/rain_icmp.c
59 +++ b/source/rain_icmp.c
60 @@ -17,6 +17,7 @@
61   *-------------------------------------------------*/
62  #include "rain_common.h"
63  
64 +unsigned char icmpinfo[56][56][56];
65  
66  /* 
67   * Prints all the ICMP type/code combinations 
68 --- a/include/rain_igmp.h
69 +++ b/include/rain_igmp.h
70 @@ -18,7 +18,7 @@
71  #ifndef _RAIN_IGMP_H
72  #define _RAIN_IGMP_H
73  
74 -unsigned char igmpinfo[56][56][5];
75 +extern unsigned char igmpinfo[56][56][5];
76  
77  
78  extern void print_igmp_info(void);
79 --- a/source/rain_igmp.c
80 +++ b/source/rain_igmp.c
81 @@ -17,7 +17,7 @@
82   *-------------------------------------------------*/
83  #include "rain_common.h"
84  
85 -       
86 +unsigned char igmpinfo[56][56][5];
87  
88  /*
89   * Prints IGMP type/code descriptions
90 --- a/include/rain_tcp.h
91 +++ b/include/rain_tcp.h
92 @@ -20,7 +20,7 @@
93  #ifndef _RAIN_TCP_H
94  #define _RAIN_TCP_H
95  
96 -unsigned char tcpinfo[25];
97 +extern unsigned char tcpinfo[25];
98  
99  extern void tcp_info_init(struct pkt_info_tcp *);
100  extern int tcp_shower_connect(struct sockaddr_in *, struct pkt_info *);
101 --- a/source/rain_tcp.c
102 +++ b/source/rain_tcp.c
103 @@ -17,7 +17,7 @@
104   *-------------------------------------------------*/
105  #include "rain_common.h"
106  
107 -
108 +unsigned char tcpinfo[25];
109  
110  /* 
111   * tcp_info_init():