File 0004-bsc#1098449-dlm_stonith-explicitly-use-libstonithd.patch of Package libdlm.16617

Index: dlm-4.0.7/fence/Makefile
===================================================================
--- dlm-4.0.7.orig/fence/Makefile
+++ dlm-4.0.7/fence/Makefile
@@ -35,7 +35,7 @@ BIN_CFLAGS += -I../include
 
 BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
 BIN_LDFLAGS += `xml2-config --libs`
-BIN_LDFLAGS += -ldl
+BIN_LDFLAGS += -ldl -lstonithd
 
 all: $(BIN_TARGET)
 
Index: dlm-4.0.7/fence/stonith_helper.c
===================================================================
--- dlm-4.0.7.orig/fence/stonith_helper.c
+++ dlm-4.0.7/fence/stonith_helper.c
@@ -69,12 +69,12 @@ int main(int argc, char *argv[])
 		return rv;
 
 	if (fail_time) {
-		t = stonith_api_time_helper(nodeid, 0);
+		t = stonith_api_time(nodeid, NULL, 0);
 		if (t >= fail_time)
 			return 0;
 	}
 
-	rv = stonith_api_kick_helper(nodeid, 300, 0);
+	rv = stonith_api_kick(nodeid, NULL, 300, 0);
 	if (rv) {
 		fprintf(stderr, "kick_helper error %d nodeid %d\n", rv, nodeid);
 		openlog("dlm_stonith", LOG_CONS | LOG_PID, LOG_DAEMON);
openSUSE Build Service is sponsored by