openslp/files/default_patches/0002-openslp-2.0.0-notify-systemd-of-start-up.patch
Alexander Zhirov af925eca6d
All checks were successful
Build / Build project (push) Successful in 57s
Измненеие сборки версии 2.0.0
Исходный код взят с GitHub с последними актуальными коммитами.
Добавлена русскоязычная документация.
Пути к конфигурационным файлам заданы по умолчанию в /usr/share/defaults/etc/openslp, но могут переопределяться в /etc/openslp.
2025-05-06 21:53:19 +03:00

32 lines
891 B
Diff

diff --git a/slpd/Makefile.am b/slpd/Makefile.am
index c94dd6a..ca0f702 100644
--- a/slpd/Makefile.am
+++ b/slpd/Makefile.am
@@ -93,5 +93,5 @@ noinst_HEADERS = \
slpd_index.h
#if you're building on Irix, replace .la with .a below
-slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la
+slpd_LDADD = ../common/libcommonslpd.la ../libslpattr/libslpattr.la -lsystemd
diff --git a/slpd/slpd_main.c b/slpd/slpd_main.c
index 130497e..6359c4b 100644
--- a/slpd/slpd_main.c
+++ b/slpd/slpd_main.c
@@ -58,6 +58,8 @@
#include "slp_xid.h"
#include "slp_net.h"
+#include <systemd/sd-daemon.h>
+
int G_SIGALRM;
int G_SIGTERM;
int G_SIGHUP;
@@ -668,6 +670,7 @@ int main(int argc, char * argv[])
/* Main loop */
SLPDLog("Startup complete entering main run loop ...\n\n");
+ sd_notify(0, "READY=1");
G_SIGALRM = 0;
G_SIGTERM = 0;
G_SIGHUP = 0;