From 8b6e236b09990f83bd3c96aae02da3359242c0b7 Mon Sep 17 00:00:00 2001 From: Kris Katterjohn Date: Thu, 22 Aug 2019 16:33:10 -0500 Subject: [PATCH] (chibi pty): fix compilation errors on the BSDs * Include util.h instead of pty.h on OpenBSD and NetBSD * Include libutil.h instead of pty.h on FreeBSD and DragonFly BSD * Include utmp.h only on non-BSD systems (FreeBSD does not have that header and none of these BSDs require it) Tested on all four of these BSDs. --- lib/chibi/pty.stub | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/chibi/pty.stub b/lib/chibi/pty.stub index 39026f24..04c66bfa 100644 --- a/lib/chibi/pty.stub +++ b/lib/chibi/pty.stub @@ -1,8 +1,10 @@ (cond-expand - (macosx (c-system-include "util.h")) + ((or macosx openbsd netbsd) (c-system-include "util.h")) + ((or freebsd dragonfly) (c-system-include "libutil.h")) (else (c-system-include "pty.h"))) -(c-system-include "utmp.h") +(cond-expand + ((not bsd) (c-system-include "utmp.h"))) (c-link "util")