Useless uses of utmp.h
Chris Rees
utisoft at gmail.com
Tue Jan 25 20:48:16 UTC 2011
Hi again,
I've got Busybox to compile on FreeBSD-9 now, but to do that I needed
to knock out all occurrences of utmp.h.
My solution was to make compilation of utmp.c conditional on
ENABLE_FEATURE_UTMP, and also to make
includes of utmp.h in:
coreutils/who.c
libbb/messages.c
miscutils/last.c
miscutils/runlevel.c
miscutils/wall.c
conditional on ENABLE_FEATURE_UTMP too. They still compile on FreeBSD
without the includes (and with
ENABLE_FEATURE_UTMP not defined), but does it still work on Linux afterwards?
The patch is http://www.bayofrum.net/~chris/patches/busybox-utmp-safe.diff
Perhaps it should have a little review first.
Thanks for all your help!
Chris
More information about the busybox
mailing list