Why this patch

I wanted qmail to build on systems that no longer provide <utmp.h> because they’ve completed the transition to <utmpx.h>. (This only affects qbiff(1), but still.) This patch is based on Ed Schouten’s for FreeBSD ports.

Without this patch

On a system without <utmp.h>, watch the qmail build fail in qbiff.c.

With this patch

On a system with <utmpx.h> but no <utmp.h>, the build will proceed past qbiff.c.

On a system with <utmpx.h> and <utmp.h>, it’ll use <utmpx.h>.

On a system with no <utmpx.h>, no change.

Get this patch

Download and apply netqmail-1.06-qbiffutmpx-20170820.patch.

(Generated with git diff netqmail-1.06 netqmail-1.06-qbiffutmpx-20170820.)

Improve this patch

If you see a simpler way to do it, I’d love to know.