Useless uses of utmp.h

Rich Felker dalias at aerifal.cx
Tue Jan 25 23:31:49 UTC 2011


On Tue, Jan 25, 2011 at 11:22:38PM +0100, Denys Vlasenko wrote:
> On Tuesday 25 January 2011 21:48, Chris Rees wrote:
> > 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.
> 
> Applied in a slightly different form.

Cheers, I've been waiting for this! Any chance of getting around to
applying the portability patches I sent?

Rich


More information about the busybox mailing list