File openslp.sd_notify.diff of Package openslp

--- slpd/slpd_main.c.orig
+++ slpd/slpd_main.c
@@ -59,6 +59,8 @@
 #include "slp_net.h"
 #include "slp_network.h"
 
+#include <systemd/sd-daemon.h>
+
 int G_SIGALRM;
 int G_SIGTERM;
 int G_SIGHUP;
@@ -748,6 +750,7 @@ int main(int argc, char * argv[])
    alarm(2);
 
    /* Main loop */
+   sd_notify(0, "READY=1");
    SLPDLog("Startup complete entering main run loop ...\n\n");
    G_SIGALRM   = 0;
    G_SIGTERM   = 0;
--- configure.ac.orig
+++ configure.ac
@@ -35,6 +35,10 @@ AC_CHECK_LIB([nsl], [gethostbyname])
 AC_CHECK_LIB([m], [log10])
 AC_CHECK_LIB([pthread], [pthread_create])
 
+PKG_PROG_PKG_CONFIG
+
+PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon])
+
 #
 # Checks for header files
 #
--- slpd/Makefile.am.orig
+++ slpd/Makefile.am
@@ -95,5 +95,5 @@ noinst_HEADERS = \
 	slpd_initda.h
     
 #if you're building on Irix, replace .la with .a below
-slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la
+slpd_LDADD = $(SYSTEMD_LIBS) ../common/libcommonslpd.la ../libslpattr/libslpattr.la
 
openSUSE Build Service is sponsored by