tags 777853 + patch
thanks

Here's a fix for GCC5 build issue. Added extern to inline functions in ftfil.c

Upstream may prefer to move to C99 instead, please see section
"Different semantics for inline functions" at
https://gcc.gnu.org/gcc-5/porting_to.html for more background.

--
Alexander Balderson
Linux for HP Helion OpenStack, Hewlett-Packard
--- flow-tools-0.68/lib/ftfil.c	2015-07-17 19:46:14.520000000 +0000
+++ flow-tools-0.68.fixed/lib/ftfil.c	2015-07-17 20:57:52.136000000 +0000
@@ -547,7 +547,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_src_as(struct ftfil_lookup_as *lookup, char *rec,
+extern inline int eval_match_src_as(struct ftfil_lookup_as *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   u_int16 *src_as;
@@ -574,7 +574,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_dst_as(struct ftfil_lookup_as *lookup, char *rec,
+extern inline int eval_match_dst_as(struct ftfil_lookup_as *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   u_int16 *dst_as;
@@ -602,7 +602,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_prot(struct ftfil_lookup_ip_prot *lookup, char *rec,
+extern inline int eval_match_ip_prot(struct ftfil_lookup_ip_prot *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   u_int8 *ip_prot;
@@ -630,7 +630,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_src_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
+extern inline int eval_match_ip_src_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int8 *src_mask;
@@ -658,7 +658,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_dst_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
+extern inline int eval_match_ip_dst_prefix_len(struct ftfil_lookup_ip_prefix_len *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int8 *dst_mask;
@@ -686,7 +686,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_tos(struct ftfil_lookup_ip_tos *lookup,
+extern inline int eval_match_ip_tos(struct ftfil_lookup_ip_tos *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int8 tos;
@@ -714,7 +714,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_marked_tos(struct ftfil_lookup_ip_tos *lookup,
+extern inline int eval_match_ip_marked_tos(struct ftfil_lookup_ip_tos *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int8 marked_tos;
@@ -743,7 +743,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_tcp_flags(struct ftfil_lookup_ip_tcp_flags *lookup,
+extern inline int eval_match_ip_tcp_flags(struct ftfil_lookup_ip_tcp_flags *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int8 tcp_flags;
@@ -772,7 +772,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_src_port(struct ftfil_lookup_ip_port *lookup,
+extern inline int eval_match_ip_src_port(struct ftfil_lookup_ip_port *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int16 *src_port;
@@ -799,7 +799,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_dst_port(struct ftfil_lookup_ip_port *lookup,
+extern inline int eval_match_ip_dst_port(struct ftfil_lookup_ip_port *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int16 *dst_port;
@@ -827,7 +827,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_src_if_index(struct ftfil_lookup_if_index *lookup,
+extern inline int eval_match_src_if_index(struct ftfil_lookup_if_index *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int16 *src_if_index;
@@ -854,7 +854,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_dst_if_index(struct ftfil_lookup_if_index *lookup,
+extern inline int eval_match_dst_if_index(struct ftfil_lookup_if_index *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int16 *dst_if_index;
@@ -882,7 +882,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_engine_id(struct ftfil_lookup_engine *lookup,
+extern inline int eval_match_engine_id(struct ftfil_lookup_engine *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int8 *engine_id;
@@ -910,7 +910,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_engine_type(struct ftfil_lookup_engine *lookup,
+extern inline int eval_match_engine_type(struct ftfil_lookup_engine *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   u_int8 *engine_type;
@@ -937,7 +937,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_flows(struct ftfil_lookup_counter *lookup, char *rec,
+extern inline int eval_match_flows(struct ftfil_lookup_counter *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_counter_rec *ftflcr;
@@ -1002,7 +1002,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_octets(struct ftfil_lookup_counter *lookup, char *rec,
+extern inline int eval_match_octets(struct ftfil_lookup_counter *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_counter_rec *ftflcr;
@@ -1067,7 +1067,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_packets(struct ftfil_lookup_counter *lookup, char *rec,
+extern inline int eval_match_packets(struct ftfil_lookup_counter *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_counter_rec *ftflcr;
@@ -1132,7 +1132,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_xtra_packets(struct ftfil_lookup_counter *lookup,
+extern inline int eval_match_xtra_packets(struct ftfil_lookup_counter *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_counter_rec *ftflcr;
@@ -1197,7 +1197,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_duration(struct ftfil_lookup_counter *lookup, char *rec,
+extern inline int eval_match_duration(struct ftfil_lookup_counter *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_counter_rec *ftflcr;
@@ -1264,7 +1264,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_start_time_date(struct ftfil_lookup_counter *lookup,
+extern inline int eval_match_start_time_date(struct ftfil_lookup_counter *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_counter_rec *ftflcr;
@@ -1335,7 +1335,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_end_time_date(struct ftfil_lookup_counter *lookup,
+extern inline int eval_match_end_time_date(struct ftfil_lookup_counter *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_counter_rec *ftflcr;
@@ -1406,7 +1406,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_start_time(struct ftfil_lookup_time *lookup,
+extern inline int eval_match_start_time(struct ftfil_lookup_time *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   time_t t1, t2;
@@ -1496,7 +1496,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_end_time(struct ftfil_lookup_time *lookup,
+extern inline int eval_match_end_time(struct ftfil_lookup_time *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   time_t t1, t2;
@@ -1586,7 +1586,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_src_tag_l(struct ftfil_lookup_tag_mask *lookup,
+extern inline int eval_match_src_tag_l(struct ftfil_lookup_tag_mask *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_tag_mask_rec *ftfltmr;
@@ -1624,7 +1624,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_src_tag_h(struct ftfil_lookup_tag *lookup,
+extern inline int eval_match_src_tag_h(struct ftfil_lookup_tag *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftchash_rec_fil_c32 *ftch_recfc32p;
@@ -1658,7 +1658,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_dst_tag_h(struct ftfil_lookup_tag *lookup,
+extern inline int eval_match_dst_tag_h(struct ftfil_lookup_tag *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftchash_rec_fil_c32 *ftch_recfc32p;
@@ -1692,7 +1692,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_dst_tag_l(struct ftfil_lookup_tag_mask *lookup,
+extern inline int eval_match_dst_tag_l(struct ftfil_lookup_tag_mask *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_tag_mask_rec *ftfltmr;
@@ -1730,7 +1730,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_nexthop_addr_l(struct ftfil_lookup_ip_mask *lookup,
+extern inline int eval_match_ip_nexthop_addr_l(struct ftfil_lookup_ip_mask *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_mask_rec *ftflipmr;
@@ -1768,7 +1768,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_nexthop_addr_h(struct ftfil_lookup_ip_address *lookup,
+extern inline int eval_match_ip_nexthop_addr_h(struct ftfil_lookup_ip_address *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftchash_rec_fil_c32 *ftch_recfc32p;
@@ -1802,7 +1802,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_nexthop_addr_r(struct ftfil_lookup_ip_prefix *lookup,
+extern inline int eval_match_ip_nexthop_addr_r(struct ftfil_lookup_ip_prefix *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_prefix_rec *ftflipprr;
@@ -1839,7 +1839,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_sc_addr_l(struct ftfil_lookup_ip_mask *lookup,
+extern inline int eval_match_ip_sc_addr_l(struct ftfil_lookup_ip_mask *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_mask_rec *ftflipmr;
@@ -1877,7 +1877,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_sc_addr_h(struct ftfil_lookup_ip_address *lookup,
+extern inline int eval_match_ip_sc_addr_h(struct ftfil_lookup_ip_address *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftchash_rec_fil_c32 *ftch_recfc32p;
@@ -1911,7 +1911,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_sc_addr_r(struct ftfil_lookup_ip_prefix *lookup,
+extern inline int eval_match_ip_sc_addr_r(struct ftfil_lookup_ip_prefix *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_prefix_rec *ftflipprr;
@@ -1948,7 +1948,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_src_addr_l(struct ftfil_lookup_ip_mask *lookup,
+extern inline int eval_match_ip_src_addr_l(struct ftfil_lookup_ip_mask *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_mask_rec *ftflipmr;
@@ -1986,7 +1986,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_src_addr_h(struct ftfil_lookup_ip_address *lookup,
+extern inline int eval_match_ip_src_addr_h(struct ftfil_lookup_ip_address *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftchash_rec_fil_c32 *ftch_recfc32p;
@@ -2020,7 +2020,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_src_addr_r(struct ftfil_lookup_ip_prefix *lookup,
+extern inline int eval_match_ip_src_addr_r(struct ftfil_lookup_ip_prefix *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_prefix_rec *ftflipprr;
@@ -2057,7 +2057,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_dst_addr_l(struct ftfil_lookup_ip_mask *lookup,
+extern inline int eval_match_ip_dst_addr_l(struct ftfil_lookup_ip_mask *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_mask_rec *ftflipmr;
@@ -2095,7 +2095,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_dst_addr_h(struct ftfil_lookup_ip_address *lookup,
+extern inline int eval_match_ip_dst_addr_h(struct ftfil_lookup_ip_address *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftchash_rec_fil_c32 *ftch_recfc32p;
@@ -2129,7 +2129,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_dst_addr_r(struct ftfil_lookup_ip_prefix *lookup,
+extern inline int eval_match_ip_dst_addr_r(struct ftfil_lookup_ip_prefix *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_prefix_rec *ftflipprr;
@@ -2166,7 +2166,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_exporter_addr_l(struct ftfil_lookup_ip_mask *lookup,
+extern inline int eval_match_ip_exporter_addr_l(struct ftfil_lookup_ip_mask *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_mask_rec *ftflipmr;
@@ -2204,7 +2204,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_exporter_addr_h(struct ftfil_lookup_ip_address *lookup,
+extern int eval_match_ip_exporter_addr_h(struct ftfil_lookup_ip_address *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftchash_rec_fil_c32 *ftch_recfc32p;
@@ -2238,7 +2238,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_ip_exporter_addr_r(struct ftfil_lookup_ip_prefix *lookup,
+extern inline int eval_match_ip_exporter_addr_r(struct ftfil_lookup_ip_prefix *lookup,
   char *rec, struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_ip_prefix_rec *ftflipprr;
@@ -2275,7 +2275,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_bps(struct ftfil_lookup_double *lookup, char *rec,
+extern inline int eval_match_bps(struct ftfil_lookup_double *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_double_rec *ftfldr;
@@ -2349,7 +2349,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_pps(struct ftfil_lookup_double *lookup, char *rec,
+extern inline int eval_match_pps(struct ftfil_lookup_double *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   struct ftfil_lookup_double_rec *ftfldr;
@@ -2423,7 +2423,7 @@
  * returns: FT_FIL_MODE_PERMIT
  *          FT_FIL_MODE_DENY
  */
-inline int eval_match_random_sample(struct ftfil_lookup_rate *lookup, char *rec,
+extern inline int eval_match_random_sample(struct ftfil_lookup_rate *lookup, char *rec,
   struct fts3rec_offsets *fo)
 {
   int val;

Reply via email to