There are a few reasons that this won't compile under mac osx. Namely, some things like time.h need to be included to get at time_t, and utmp stuff has changed. In particular with the utmp stuff, on osx and freebsd, we don't have ut_addr_v6 in the utmp struct.
Although the changes here will allow this to compile, I have not tested that it will allow running correctly.
There are a few reasons that this won't compile under mac osx. Namely, some things like time.h need to be included to get at time_t, and utmp stuff has changed. In particular with the utmp stuff, on osx and freebsd, we don't have ut_addr_v6 in the utmp struct.
Although the changes here will allow this to compile, I have not tested that it will allow running correctly.