- d/p/tmpfix-ppc-build-error.patch: fix ppc64el build issue
[deb_dpdk.git] / debian / patches / tmpfix-ppc-build-error.patch
1 Description: Fix ppc64le build error between altivec and bool
2
3 We really hope there will eventually be a better fix for this, but currently
4 we have to unbreak building this code so until something better is available
5 let's use this modification.
6
7 Forwarded: yes
8 Forward-info: http://mails.dpdk.org/archives/dev/2018-August/109926.html
9 Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
10 Last-Update: 2018-08-22
11 --- a/drivers/net/mlx5/mlx5_nl.c
12 +++ b/drivers/net/mlx5/mlx5_nl.c
13 @@ -834,8 +834,8 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *
14                 .switch_id = 0,
15         };
16         size_t off = NLMSG_LENGTH(sizeof(struct ifinfomsg));
17 -       bool port_name_set = false;
18 -       bool switch_id_set = false;
19 +       int port_name_set = 0;
20 +       int switch_id_set = 0;
21  
22         if (nh->nlmsg_type != RTM_NEWLINK)
23                 goto error;
24 @@ -854,7 +854,7 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *
25                         if (errno ||
26                             (size_t)(end - (char *)payload) != strlen(payload))
27                                 goto error;
28 -                       port_name_set = true;
29 +                       port_name_set = 1;
30                         break;
31                 case IFLA_PHYS_SWITCH_ID:
32                         info.switch_id = 0;
33 @@ -862,7 +862,7 @@ mlx5_nl_switch_info_cb(struct nlmsghdr *
34                                 info.switch_id <<= 8;
35                                 info.switch_id |= ((uint8_t *)payload)[i];
36                         }
37 -                       switch_id_set = true;
38 +                       switch_id_set = 1;
39                         break;
40                 }
41                 off += RTA_ALIGN(ra->rta_len);
42 --- a/drivers/net/mlx5/mlx5_ethdev.c
43 +++ b/drivers/net/mlx5/mlx5_ethdev.c
44 @@ -1335,8 +1335,8 @@ mlx5_sysfs_switch_info(unsigned int ifin
45         char ifname[IF_NAMESIZE];
46         FILE *file;
47         struct mlx5_switch_info data = { .master = 0, };
48 -       bool port_name_set = false;
49 -       bool port_switch_id_set = false;
50 +       int port_name_set = 0;
51 +       int port_switch_id_set = 0;
52         char c;
53  
54         if (!if_indextoname(ifindex, ifname)) {
55 --- a/drivers/net/mlx5/mlx5_nl_flow.c
56 +++ b/drivers/net/mlx5/mlx5_nl_flow.c
57 @@ -385,11 +385,11 @@ mlx5_nl_flow_transpose(void *buf,
58         const struct rte_flow_action *action;
59         unsigned int n;
60         uint32_t act_index_cur;
61 -       bool in_port_id_set;
62 -       bool eth_type_set;
63 -       bool vlan_present;
64 -       bool vlan_eth_type_set;
65 -       bool ip_proto_set;
66 +       int in_port_id_set;
67 +       int eth_type_set;
68 +       int vlan_present;
69 +       int vlan_eth_type_set;
70 +       int ip_proto_set;
71         struct nlattr *na_flower;
72         struct nlattr *na_flower_act;
73         struct nlattr *na_vlan_id;
74 @@ -404,11 +404,11 @@ init:
75         action = actions;
76         n = 0;
77         act_index_cur = 0;
78 -       in_port_id_set = false;
79 -       eth_type_set = false;
80 -       vlan_present = false;
81 -       vlan_eth_type_set = false;
82 -       ip_proto_set = false;
83 +       in_port_id_set = 0;
84 +       eth_type_set = 0;
85 +       vlan_present = 0;
86 +       vlan_eth_type_set = 0;
87 +       ip_proto_set = 0;
88         na_flower = NULL;
89         na_flower_act = NULL;
90         na_vlan_id = NULL;