summaryrefslogtreecommitdiff
path: root/Libraries/LibC
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2020-09-09 08:38:23 +0100
committerAndreas Kling <kling@serenityos.org>2020-09-27 01:02:11 +0200
commit9d8f1032b70713207670b571660a42d29b1814ae (patch)
tree46951988c14b71a3b6b10a47663f9a77bba27efe /Libraries/LibC
parent721788943d9385b16521c91ab3121dbd8f7b4ff3 (diff)
downloadserenity-9d8f1032b70713207670b571660a42d29b1814ae.zip
LibC: Add missing utmp backwards compatibility hacks and user/dead process macros
The user/dead process macros are not used anywhere in Serenity right now, but are required for OpenSSH.
Diffstat (limited to 'Libraries/LibC')
-rw-r--r--Libraries/LibC/utmp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/Libraries/LibC/utmp.h b/Libraries/LibC/utmp.h
index cf94b59edf..0b0ca85946 100644
--- a/Libraries/LibC/utmp.h
+++ b/Libraries/LibC/utmp.h
@@ -36,6 +36,9 @@ struct exit_status { /* Type for ut_exit, below */
short int e_exit; /* Process exit status */
};
+#define USER_PROCESS 7
+#define DEAD_PROCESS 8
+
#define UT_NAMESIZE 32
#define UT_LINESIZE 32
#define UT_HOSTSIZE 256
@@ -64,4 +67,12 @@ struct utmp {
char __unused[20]; /* Reserved for future use */
};
+/* Backward compatibility hacks */
+#define ut_name ut_user
+#ifndef _NO_UT_TIME
+# define ut_time ut_tv.tv_sec
+#endif
+#define ut_xtime ut_tv.tv_sec
+#define ut_addr ut_addr_v6[0]
+
__END_DECLS