aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/options/linux/generic/utmpx.cpp
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:00 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 17:28:32 -0500
commitbd5969fc876a10b18613302db7087ef3c40f18e1 (patch)
tree7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/linux/generic/utmpx.cpp
parenta95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff)
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/linux/generic/utmpx.cpp')
-rw-r--r--lib/mlibc/options/linux/generic/utmpx.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/mlibc/options/linux/generic/utmpx.cpp b/lib/mlibc/options/linux/generic/utmpx.cpp
new file mode 100644
index 0000000..4742567
--- /dev/null
+++ b/lib/mlibc/options/linux/generic/utmpx.cpp
@@ -0,0 +1,45 @@
+#include <bits/ensure.h>
+#include <stddef.h>
+#include <errno.h>
+#include <utmpx.h>
+#include <mlibc/debug.hpp>
+
+void updwtmpx(const char *, const struct utmpx *) {
+ // Empty as musl does
+ mlibc::infoLogger() << "\e[31mmlibc: updwtmpx() is a stub\e[39m" << frg::endlog;
+}
+
+void endutxent(void) {
+ // Empty as musl does
+ mlibc::infoLogger() << "\e[31mmlibc: endutxent() is a stub\e[39m" << frg::endlog;
+}
+
+void setutxent(void) {
+ // Empty as musl does
+ mlibc::infoLogger() << "\e[31mmlibc: setutxent() is a stub\e[39m" << frg::endlog;
+}
+
+struct utmpx *getutxent(void) {
+ // return NULL as musl does
+ mlibc::infoLogger() << "\e[31mmlibc: getutxent() is a stub\e[39m" << frg::endlog;
+ return NULL;
+}
+
+struct utmpx *pututxline(const struct utmpx *) {
+ // return NULL as musl does
+ mlibc::infoLogger() << "\e[31mmlibc: pututxline() is a stub\e[39m" << frg::endlog;
+ return NULL;
+}
+
+int utmpxname(const char *) {
+ // return -1 as musl does
+ mlibc::infoLogger() << "\e[31mmlibc: utmpxname() is a stub\e[39m" << frg::endlog;
+ errno = ENOSYS;
+ return -1;
+}
+
+struct utmpx *getutxid(const struct utmpx *) {
+ // return NULL as musl does
+ mlibc::infoLogger() << "\e[31mmlibc: getutxid() is a stub\e[39m" << frg::endlog;
+ return NULL;
+}