From a5aa78dda423a3ed3043856fa116300fc763a626 Mon Sep 17 00:00:00 2001 From: Luca Bruno <luca.bruno@coreos.com> Date: Sun, 1 Sep 2019 13:52:38 +0000 Subject: [PATCH] freebsd: add utmpx constants This adds a few missing constants from FreeBSD `utmpx.h`. Ref: https://github.com/freebsd/freebsd/blob/a1d2b5187332a366a897689c5fb41d38d7e1b0d8/include/utmpx.h --- src/unix/bsd/freebsdlike/freebsd/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index d534af90..498bc20c 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -1008,6 +1008,7 @@ pub const MSG_COMPAT: ::c_int = 0x00008000; pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000; pub const MSG_NOSIGNAL: ::c_int = 0x20000; +// utmpx entry types pub const EMPTY: ::c_short = 0; pub const BOOT_TIME: ::c_short = 1; pub const OLD_TIME: ::c_short = 2; @@ -1017,6 +1018,10 @@ pub const INIT_PROCESS: ::c_short = 5; pub const LOGIN_PROCESS: ::c_short = 6; pub const DEAD_PROCESS: ::c_short = 7; pub const SHUTDOWN_TIME: ::c_short = 8; +// utmp database types +pub const UTXDB_ACTIVE: ::c_int = 0; +pub const UTXDB_LASTLOGIN: ::c_int = 1; +pub const UTXDB_LOG: ::c_int = 2; pub const LC_COLLATE_MASK: ::c_int = (1 << 0); pub const LC_CTYPE_MASK: ::c_int = (1 << 1); -- GitLab