diff options
author | David Carlier <devnexen@gmail.com> | 2020-08-08 17:30:15 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-08-10 09:49:18 +0200 |
commit | cedf463d1b677e60c5fce516bb52cc6cc79996ae (patch) | |
tree | c5b0236ea9fda31a4411078b8a5be06313443b1f | |
parent | a41cf3e1d2ed3ae38ad6115a8b65e5f14dae0b49 (diff) | |
download | php-git-cedf463d1b677e60c5fce516bb52cc6cc79996ae.tar.gz |
proc_open/openpty: DragonFlyBSD build fix.
Similarly to NetBSD emalloc-ish api had been introduced into libutil.
Closes GH-5960.
-rw-r--r-- | ext/standard/proc_open.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index 5e7a782471..2f5d15d738 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -48,9 +48,13 @@ # elif defined(__FreeBSD__) /* FreeBSD defines `openpty` in <libutil.h> */ # include <libutil.h> -# elif defined(__NetBSD__) -/* On recent NetBSD releases the emalloc, estrdup ... calls had been introduced in libutil */ -# include <sys/termios.h> +# elif defined(__NetBSD__) || defined(__DragonFly__) +/* On recent NetBSD/DragonFlyBSD releases the emalloc, estrdup ... calls had been introduced in libutil */ +# if defined(__NetBSD__) +# include <sys/termios.h> +# else +# include <termios.h> +# endif extern int openpty(int *, int *, char *, struct termios *, struct winsize *); # else /* Mac OS X (and some BSDs) define `openpty` in <util.h> */ |