Logoj0ke.net Open Build Service > Projects > home:jg:rebuilds > heartbeat > fix-ftbfs-lp1188428.patch
Sign Up | Log In

File fix-ftbfs-lp1188428.patch of Package heartbeat (Revision 980ca6df158ee60ffc420a4b6c0f64f6)

Currently displaying revision 980ca6df158ee60ffc420a4b6c0f64f6, show latest

 
1
Description: Fix FTBFS
2
 Fix FTBFS because of duplicate variable 'i' for both a struct and an
3
 int variable.
4
Author: Andres Rodriguez <andreserl@ubuntu.com>
5
Bug-Ubuntu: https://launchpad.net/bugs/1188428
6
Bug-Debian: http://bugs.debian.org/713662
7
Forwarded: no
8
9
--- a/lib/plugins/HBcomm/ucast.c
10
+++ b/lib/plugins/HBcomm/ucast.c
11
@@ -460,7 +460,7 @@
12
    struct ip_private *ei;
13
    int tos;
14
 #if defined(SO_BINDTODEVICE)
15
-   struct ifreq i;
16
+   struct ifreq ifc;
17
 #endif
18
 #if defined(SO_REUSEPORT)
19
    int i = 1;
20
@@ -497,18 +497,18 @@
21
         *
22
         * This is so we can have redundant NICs, and heartbeat on both
23
         */
24
-       strcpy(i.ifr_name,  ei->interface);
25
+       strcpy(ifc.ifr_name,  ei->interface);
26
 
27
        if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
28
-               &i, sizeof(i)) == -1) {
29
+               &ifc, sizeof(ifc)) == -1) {
30
            PILCallLog(LOG, PIL_CRIT,
31
              "ucast: error setting option SO_BINDTODEVICE(w) on %s: %s",
32
-             i.ifr_name, strerror(errno));
33
+             ifc.ifr_name, strerror(errno));
34
            close(sockfd);
35
            return -1;
36
        }
37
        PILCallLog(LOG, PIL_INFO, "ucast: bound send socket to device: %s",
38
-           i.ifr_name);
39
+           ifc.ifr_name);
40
    }
41
 #endif
42
 #if defined(SO_REUSEPORT)
43