gentoo-overlay/sys-apps/systemd/files/0017-Port-to-s6-utmps.patch

73 lines
1.8 KiB
Diff
Raw Permalink Normal View History

From 09647d86120432cf9581e340b72a550df3dc2eb7 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Sun, 18 Aug 2024 03:00:43 -0500
Subject: [PATCH 17/34] Port to s6-utmps
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
This cannot be upstreamed.
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
---
src/basic/user-util.c | 2 +-
src/shared/utmp-wtmp.h | 2 ++
src/sysusers/sysusers.c | 2 +-
src/userdb/userdbctl.c | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/basic/user-util.c b/src/basic/user-util.c
index 6bdf5bf1cdc9..42fbabec7892 100644
--- a/src/basic/user-util.c
+++ b/src/basic/user-util.c
@@ -9,7 +9,7 @@
#include <sys/file.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <utmp.h>
+#include <utmpx.h>
#include "sd-messages.h"
diff --git a/src/shared/utmp-wtmp.h b/src/shared/utmp-wtmp.h
index 2e04fac40472..f8018ddc0141 100644
--- a/src/shared/utmp-wtmp.h
+++ b/src/shared/utmp-wtmp.h
@@ -8,6 +8,8 @@
#if ENABLE_UTMP
#include <utmpx.h>
+#define _PATH_UTMPX UTMPX_FILE
+#define _PATH_WTMPX WTMPX_FILE
int utmp_get_runlevel(int *runlevel, int *previous);
diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
index 7758267b17ab..3e2c91bfa323 100644
--- a/src/sysusers/sysusers.c
+++ b/src/sysusers/sysusers.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <getopt.h>
-#include <utmp.h>
+#include <utmpx.h>
#include "alloc-util.h"
#include "build.h"
diff --git a/src/userdb/userdbctl.c b/src/userdb/userdbctl.c
index 1718419407bc..1da975ed7807 100644
--- a/src/userdb/userdbctl.c
+++ b/src/userdb/userdbctl.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <getopt.h>
-#include <utmp.h>
+#include <utmpx.h>
#include "build.h"
#include "dirent-util.h"
--
2.41.0