Fix FreeBSD build by including libutil.h for openpty
This commit is contained in:
parent
614646a5b6
commit
8e5381f674
1 changed files with 5 additions and 4 deletions
9
murx.c
9
murx.c
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue