mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
lirc: add patches from Debian Buster
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
60541fc7a4
commit
f999f5818e
@ -0,0 +1,24 @@
|
||||
From: Alec Leamas <leamas.alec@gmail.com>
|
||||
Date: Fri, 23 Nov 2018 23:04:35 -0500
|
||||
Subject: [PATCH] logging: Don't use broken LOG_CONS syslog flag.
|
||||
|
||||
---
|
||||
lib/lirc_log.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/lirc_log.c b/lib/lirc_log.c
|
||||
index bea357b..900beb3 100644
|
||||
--- a/lib/lirc_log.c
|
||||
+++ b/lib/lirc_log.c
|
||||
@@ -102,9 +102,9 @@ int lirc_log_open(const char* _progname, int _nodaemon, loglevel_t level)
|
||||
|
||||
if (use_syslog) {
|
||||
if (nodaemon)
|
||||
- openlog(syslogident, LOG_CONS | LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
+ openlog(syslogident, LOG_PID | LOG_PERROR, LOG_LOCAL0);
|
||||
else
|
||||
- openlog(syslogident, LOG_CONS | LOG_PID, LOG_LOCAL0);
|
||||
+ openlog(syslogident, LOG_PID, LOG_LOCAL0);
|
||||
} else {
|
||||
lf = fopen(logfile, "a");
|
||||
if (lf == NULL) {
|
@ -0,0 +1,22 @@
|
||||
From: Alec Leamas <leamas.alec@gmail.com>
|
||||
Date: Sun, 30 Dec 2018 21:26:15 +0100
|
||||
Subject: [PATCH] lircd: Fix --connect option parsing error (#343).
|
||||
|
||||
Bug: https://sourceforge.net/p/lirc/tickets/343/
|
||||
---
|
||||
daemons/lircd.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
|
||||
index d5be708..ad8dde9 100644
|
||||
--- a/daemons/lircd.cpp
|
||||
+++ b/daemons/lircd.cpp
|
||||
@@ -790,7 +790,7 @@ int add_peer_connection(const char* server_arg)
|
||||
struct servent* service;
|
||||
char server[strlen(server_arg) + 1];
|
||||
|
||||
- strncpy(server, server_arg, sizeof(server) - 1);
|
||||
+ strncpy(server, server_arg, sizeof(server));
|
||||
|
||||
if (peern < MAX_PEERS) {
|
||||
peers[peern] = (struct peer_connection*) malloc(sizeof(
|
@ -0,0 +1,43 @@
|
||||
From: William Manley <will@williammanley.net>
|
||||
Date: Thu, 9 Aug 2018 18:26:44 +0100
|
||||
Subject: [PATCH] systemd support: Notify systemd on successful startup
|
||||
|
||||
This allows systemd to detect the case where we've failed to startup
|
||||
due to a failure to parse our config files.
|
||||
|
||||
Origin: upstream, https://sourceforge.net/p/lirc/git/ci/b78df9b2950cf4
|
||||
Applied-Upstream: 0.11.0
|
||||
---
|
||||
daemons/lircd.cpp | 5 +++++
|
||||
systemd/lircd.service | 2 +-
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
|
||||
index ad8dde9..f559b62 100644
|
||||
--- a/daemons/lircd.cpp
|
||||
+++ b/daemons/lircd.cpp
|
||||
@@ -2469,6 +2469,11 @@ int main(int argc, char** argv)
|
||||
if (!nodaemon)
|
||||
daemonize();
|
||||
|
||||
+#ifdef HAVE_SYSTEMD
|
||||
+ /* Tell systemd that we started up correctly */
|
||||
+ sd_notify(0, "READY=1");
|
||||
+#endif
|
||||
+
|
||||
loop();
|
||||
|
||||
/* never reached */
|
||||
diff --git a/systemd/lircd.service b/systemd/lircd.service
|
||||
index 7f75805..6af049b 100644
|
||||
--- a/systemd/lircd.service
|
||||
+++ b/systemd/lircd.service
|
||||
@@ -6,7 +6,7 @@ Wants=lircd-setup.service
|
||||
After=network.target lircd-setup.service
|
||||
|
||||
[Service]
|
||||
-Type=simple
|
||||
+Type=notify
|
||||
ExecStart=/usr/sbin/lircd --nodaemon
|
||||
; User=lirc
|
||||
; Group=lirc
|
Loading…
x
Reference in New Issue
Block a user