diff options
author | Josh Rahm <rahm@google.com> | 2023-01-27 23:04:47 +0000 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2023-01-27 23:04:47 +0000 |
commit | e64dc03ff7b867826c7fc76d6fff210ad3382e33 (patch) | |
tree | 9cf71b02a7ee8f6d39ae1207201dc0745bdb8be5 /compat/systemd.c | |
parent | fb15fd116097b98c1b839cfdc76a7d84e206e6d5 (diff) | |
parent | f5af3cfb211c12897b15e3b5a3b29c4bbb0493a8 (diff) | |
download | rtmux-e64dc03ff7b867826c7fc76d6fff210ad3382e33.tar.gz rtmux-e64dc03ff7b867826c7fc76d6fff210ad3382e33.tar.bz2 rtmux-e64dc03ff7b867826c7fc76d6fff210ad3382e33.zip |
Merge remote-tracking branch 'upstream/master' into rahm
Diffstat (limited to 'compat/systemd.c')
-rw-r--r-- | compat/systemd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/compat/systemd.c b/compat/systemd.c index 7317e43a..cce42ed4 100644 --- a/compat/systemd.c +++ b/compat/systemd.c @@ -21,15 +21,23 @@ #include <systemd/sd-daemon.h> +#include <string.h> + #include "tmux.h" int +systemd_activated(void) +{ + return (sd_listen_fds(0) >= 1); +} + +int systemd_create_socket(int flags, char **cause) { int fds; int fd; struct sockaddr_un sa; - int addrlen = sizeof sa; + socklen_t addrlen = sizeof sa; fds = sd_listen_fds(0); if (fds > 1) { /* too many file descriptors */ |