aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/samba/samba-4.4.2/10-use-only-libsystemd.patch
blob: 81621ff2a72acf26115d5bf9e3d52c587f14f401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
diff -ur samba-4.4.2/lib/util/become_daemon.c samba-4.4.2/lib/util/become_daemon.c
--- samba-4.4.2/lib/util/become_daemon.c	2016-05-08 18:33:24.000000000 +0200
+++ samba-4.4.2/lib/util/become_daemon.c	2016-05-08 18:26:50.275177918 +0200
@@ -24,7 +24,7 @@
 #include "includes.h"
 #include "system/filesys.h"
 #include "system/locale.h"
-#if HAVE_LIBSYSTEMD_DAEMON
+#if HAVE_LIBSYSTEMD
 #include <systemd/sd-daemon.h>
 #endif
 #include "lib/util/close_low_fd.h"
@@ -69,9 +69,9 @@
 	if (do_fork) {
 		newpid = fork();
 		if (newpid) {
-#if HAVE_LIBSYSTEMD_DAEMON
+#if HAVE_LIBSYSTEMD
 			sd_notifyf(0, "READY=0\nSTATUS=Starting process...\nMAINPID=%lu", (unsigned long) newpid);
-#endif /* HAVE_LIBSYSTEMD_DAEMON */
+#endif /* HAVE_LIBSYSTEMD */
 			_exit(0);
 		}
 	}
@@ -98,7 +98,7 @@
 
 _PUBLIC_ void exit_daemon(const char *msg, int error)
 {
-#ifdef HAVE_LIBSYSTEMD_DAEMON
+#ifdef HAVE_LIBSYSTEMD
 	if (msg == NULL) {
 		msg = strerror(error);
 	}
@@ -117,7 +117,7 @@
 	if (name == NULL) {
 		name = "Samba";
 	}
-#ifdef HAVE_LIBSYSTEMD_DAEMON
+#ifdef HAVE_LIBSYSTEMD
 	sd_notifyf(0, "READY=1\nSTATUS=%s: ready to serve connections...", name);
 #endif
 	DEBUG(0, ("STATUS=daemon '%s' finished starting up and ready to serve "
@@ -129,7 +129,7 @@
 	if (name == NULL) {
 		name = "Samba";
 	}
-#ifdef HAVE_LIBSYSTEMD_DAEMON
+#ifdef HAVE_LIBSYSTEMD
 	sd_notifyf(0, "\nSTATUS=%s: %s", name, msg);
 #endif
 	DEBUG(0, ("STATUS=daemon '%s' : %s", name, msg));
diff -ur samba-4.4.2/lib/util/debug.c samba-4.4.2/lib/util/debug.c
--- samba-4.4.2/lib/util/debug.c	2016-05-08 18:33:24.000000000 +0200
+++ samba-4.4.2/lib/util/debug.c	2016-05-08 18:27:09.341481492 +0200
@@ -102,7 +102,7 @@
 	.fd = 2 /* stderr by default */
 };
 
-#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD_JOURNAL)
+#if defined(WITH_SYSLOG) || defined(HAVE_LIBSYSTEMD)
 static int debug_level_to_priority(int level)
 {
 	/*
@@ -179,7 +179,7 @@
 }
 #endif /* WITH_SYSLOG */
 
-#ifdef HAVE_LIBSYSTEMD_JOURNAL
+#ifdef HAVE_LIBSYSTEMD
 #include <systemd/sd-journal.h>
 static void debug_systemd_log(int msg_level,
 			      const char *msg, const char *msg_no_nl)
@@ -251,7 +251,7 @@
 	},
 #endif
 
-#ifdef HAVE_LIBSYSTEMD_JOURNAL
+#ifdef HAVE_LIBSYSTEMD
 	{
 		.name = "systemd",
 		.log = debug_systemd_log,