libbb: split update_utmp from login/getty in preparation to use it for telnetd
function old new delta
update_utent - 339 +339
login_main 1498 1128 -370
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 339/-370) Total: -31 bytes
function old new delta
update_utmp 246 337 +91
login_main 1128 1140 +12
getty_main 1908 1918 +10
...
update_utent 339 - -339
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 5/6 up/down: 119/-368) Total: -249 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
diff --git a/libbb/Kbuild b/libbb/Kbuild
index 4606d5a..1b11d5d 100644
--- a/libbb/Kbuild
+++ b/libbb/Kbuild
@@ -120,6 +120,8 @@
lib-y += xreadlink.o
lib-y += xrealloc_vector.o
+lib-$(CONFIG_FEATURE_UTMP) += utmp.o
+
# A mix of optimizations (why build stuff we know won't be used)
# and objects which may fail to build (SELinux on selinux-less system)
lib-$(CONFIG_SELINUX) += selinux_common.o