Skip to content

Commit

Permalink
proc_open/openpty: DragonFlyBSD build fix.
Browse files Browse the repository at this point in the history
Similarly to NetBSD emalloc-ish api had been introduced into libutil.

Closes GH-5960.
  • Loading branch information
devnexen authored and nikic committed Aug 10, 2020
1 parent a41cf3e commit cedf463
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions ext/standard/proc_open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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> */
Expand Down

0 comments on commit cedf463

Please sign in to comment.