On Thu, Jul 18, 2013 at 11:31 AM, Galos, David <galos...@students.rowan.edu> wrote: >> It doesn't, as far as I can tell. That implementation comes from OpenBSD's >> who. > Is the utmp file guaranteed to be machine endian? OpenBSD assumes it is. And on Linux, man 5 utmp claims: "The file format is machine-dependent, so it is recommended that it be processed only on the machine architecture where it was created."
> This patch seems to imply > that. > >> *environ = NULL; > The linux manpage suggests 'environ = NULL'. Is BSD different in that regard? Either will work as long as it's done consistently everywhere. NULLing the first entry seems slightly better (in case anyone has their own pointer, or doesn't check for NULL), but I've added a guard against an already-NULL environ. (This version also uses a slightly less harmful Makefile hack.) > > I would like to see sbase compile on OpenBSD, so hopefully we can find > solutions that works everywhere. >
sbase-openbsd-2.diff
Description: Binary data