proc_open/openpty: DragonFlyBSD build fix.

Similarly to NetBSD emalloc-ish api had been introduced into libutil.

Closes GH-5960.
This commit is contained in:
David Carlier 2020-08-08 17:30:15 +01:00 committed by Nikita Popov
parent a41cf3e1d2
commit cedf463d1b

View File

@ -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 */
# 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> */