]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
musl: introduce dummy gshadow header file for userdb
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 21 Sep 2025 06:24:06 +0000 (15:24 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 13 Nov 2025 19:59:03 +0000 (04:59 +0900)
Even 'gshadow' meson option is disabled, src/shared/userdb.c and
src/shared/user-record-nss.c include gshadow.h unconditionally.
Let's introduce dummy header to make them compiled gracefully.

src/include/musl/gshadow.h [new file with mode: 0644]

diff --git a/src/include/musl/gshadow.h b/src/include/musl/gshadow.h
new file mode 100644 (file)
index 0000000..b57c74c
--- /dev/null
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include <errno.h>
+#include <stddef.h>
+
+struct sgrp {
+        char *sg_namp;
+        char *sg_passwd;
+        char **sg_adm;
+        char **sg_mem;
+};
+
+static inline int getsgnam_r(
+                const char *__name,
+                struct sgrp *__result_buf,
+                char *__buffer,
+                size_t __buflen,
+                struct sgrp **__result) {
+
+        return EOPNOTSUPP; /* this function returns positive errno in case of error. */
+}