commit 9b6436f8c36d6d6f5ee62771ae8205c7c994c795
Author: Jakub Bogusz <[email protected]>
Date:   Fri Sep 6 19:33:26 2013 +0200

    - added ucast patch (fixes build with both SO_BINDTODEVICE and SO_REUSEPORT)

 heartbeat-ucast.patch | 34 ++++++++++++++++++++++++++++++++++
 heartbeat.spec        |  3 ++-
 2 files changed, 36 insertions(+), 1 deletion(-)
---
diff --git a/heartbeat.spec b/heartbeat.spec
index b103ce9..0301cf6 100644
--- a/heartbeat.spec
+++ b/heartbeat.spec
@@ -21,6 +21,7 @@ Patch0:               %{name}-type_mismatch.patch
 Patch1:                %{name}-ac.patch
 Patch2:                %{name}-libs.patch
 Patch3:                %{name}-tls.patch
+Patch4:                %{name}-ucast.patch
 URL:           http://www.linux-ha.org/Heartbeat
 BuildRequires: OpenIPMI-devel >= 2.0.3
 BuildRequires: autoconf
@@ -142,7 +143,7 @@ Zestaw testów klastra opartego o heartbeat.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
-rm -rf libltdl
+%patch4 -p1
 
 %build
 %{__libtoolize} --ltdl
diff --git a/heartbeat-ucast.patch b/heartbeat-ucast.patch
new file mode 100644
index 0000000..1a2469a
--- /dev/null
+++ b/heartbeat-ucast.patch
@@ -0,0 +1,34 @@
+--- Heartbeat-3-0-STABLE-3.0.5/lib/plugins/HBcomm/ucast.c.orig 2011-06-16 
12:46:23.000000000 +0200
++++ Heartbeat-3-0-STABLE-3.0.5/lib/plugins/HBcomm/ucast.c      2013-09-06 
18:42:54.906180245 +0200
+@@ -462,7 +462,7 @@
+       struct ip_private *ei;
+       int tos;
+ #if defined(SO_BINDTODEVICE)
+-      struct ifreq i;
++      struct ifreq ifrq;
+ #endif
+ #if defined(SO_REUSEPORT)
+       int i = 1;
+@@ -499,18 +499,18 @@
+                *
+                * This is so we can have redundant NICs, and heartbeat on both
+                */
+-              strcpy(i.ifr_name,  ei->interface);
++              strcpy(ifrq.ifr_name,  ei->interface);
+ 
+               if (setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE,
+-                              &i, sizeof(i)) == -1) {
++                              &ifrq, sizeof(ifrq)) == -1) {
+                       PILCallLog(LOG, PIL_CRIT,
+                         "ucast: error setting option SO_BINDTODEVICE(w) on 
%s: %s",
+-                        i.ifr_name, strerror(errno));
++                        ifrq.ifr_name, strerror(errno));
+                       close(sockfd);
+                       return -1;
+               }
+               PILCallLog(LOG, PIL_INFO, "ucast: bound send socket to device: 
%s",
+-                      i.ifr_name);
++                      ifrq.ifr_name);
+       }
+ #endif
+ #if defined(SO_REUSEPORT)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/heartbeat.git/commitdiff/9b6436f8c36d6d6f5ee62771ae8205c7c994c795

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to