1
0
Fork 0
forked from murx/murx

Fix FreeBSD build by including libutil.h for openpty

This commit is contained in:
Armin 2026-11-22 06:25:26 +01:00
commit 8e5381f674

9
murx.c
View file

@ -58,10 +58,11 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/un.h> #include <sys/un.h>
#include <sys/wait.h> #include <sys/wait.h>
/* openpty(3) lives in <pty.h> on Linux and glibc, in <util.h> on the BSDs /* openpty(3) lives in <pty.h> on Linux and glibc, in <libutil.h> on FreeBSD
and macOS. */ and DragonFly, and in <util.h> on the other BSDs and macOS. */
#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__NetBSD__) || \ #if defined(__FreeBSD__) || defined(__DragonFly__)
defined(__OpenBSD__) || defined(__APPLE__) #include <libutil.h>
#elif defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
#include <util.h> #include <util.h>
#else #else
#include <pty.h> #include <pty.h>