Updated the patch to use defined()
This commit is contained in:
parent
0acf45b178
commit
45a08328c0
@ -7,7 +7,7 @@ index 4622971907..04d77da529 100644
|
|||||||
#include "system/filesys.h"
|
#include "system/filesys.h"
|
||||||
#include "system/locale.h"
|
#include "system/locale.h"
|
||||||
-#if HAVE_LIBSYSTEMD_DAEMON
|
-#if HAVE_LIBSYSTEMD_DAEMON
|
||||||
+#if HAVE_LIBSYSTEMD_DAEMON || HAVE_LIBSYSTEMD
|
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
|
||||||
#include <systemd/sd-daemon.h>
|
#include <systemd/sd-daemon.h>
|
||||||
#endif
|
#endif
|
||||||
#include "lib/util/close_low_fd.h"
|
#include "lib/util/close_low_fd.h"
|
||||||
@ -16,7 +16,7 @@ index 4622971907..04d77da529 100644
|
|||||||
newpid = fork();
|
newpid = fork();
|
||||||
if (newpid) {
|
if (newpid) {
|
||||||
-#if HAVE_LIBSYSTEMD_DAEMON
|
-#if HAVE_LIBSYSTEMD_DAEMON
|
||||||
+#if HAVE_LIBSYSTEMD_DAEMON || HAVE_LIBSYSTEMD
|
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
|
||||||
sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid);
|
sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid);
|
||||||
#endif /* HAVE_LIBSYSTEMD_DAEMON */
|
#endif /* HAVE_LIBSYSTEMD_DAEMON */
|
||||||
_exit(0);
|
_exit(0);
|
||||||
@ -25,7 +25,7 @@ index 4622971907..04d77da529 100644
|
|||||||
_PUBLIC_ void exit_daemon(const char *msg, int error)
|
_PUBLIC_ void exit_daemon(const char *msg, int error)
|
||||||
{
|
{
|
||||||
-#ifdef HAVE_LIBSYSTEMD_DAEMON
|
-#ifdef HAVE_LIBSYSTEMD_DAEMON
|
||||||
+#if HAVE_LIBSYSTEMD_DAEMON || HAVE_LIBSYSTEMD
|
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
|
||||||
if (msg == NULL) {
|
if (msg == NULL) {
|
||||||
msg = strerror(error);
|
msg = strerror(error);
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ index 4622971907..04d77da529 100644
|
|||||||
name = "Samba";
|
name = "Samba";
|
||||||
}
|
}
|
||||||
-#ifdef HAVE_LIBSYSTEMD_DAEMON
|
-#ifdef HAVE_LIBSYSTEMD_DAEMON
|
||||||
+#if HAVE_LIBSYSTEMD_DAEMON || HAVE_LIBSYSTEMD
|
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
|
||||||
sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name);
|
sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name);
|
||||||
#endif
|
#endif
|
||||||
DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
|
DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
|
||||||
@ -43,7 +43,7 @@ index 4622971907..04d77da529 100644
|
|||||||
name = "Samba";
|
name = "Samba";
|
||||||
}
|
}
|
||||||
-#ifdef HAVE_LIBSYSTEMD_DAEMON
|
-#ifdef HAVE_LIBSYSTEMD_DAEMON
|
||||||
+#if HAVE_LIBSYSTEMD_DAEMON || HAVE_LIBSYSTEMD
|
+#if defined(HAVE_LIBSYSTEMD_DAEMON) || defined(HAVE_LIBSYSTEMD)
|
||||||
sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
|
sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
|
||||||
#endif
|
#endif
|
||||||
DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
|
DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
|
||||||
|
Loading…
Reference in New Issue
Block a user