Skip to content

Commit cedf463

Browse files
devnexennikic
authored andcommitted
proc_open/openpty: DragonFlyBSD build fix.
Similarly to NetBSD emalloc-ish api had been introduced into libutil. Closes GH-5960.
1 parent a41cf3e commit cedf463

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

ext/standard/proc_open.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@
4848
# elif defined(__FreeBSD__)
4949
/* FreeBSD defines `openpty` in <libutil.h> */
5050
# include <libutil.h>
51-
# elif defined(__NetBSD__)
52-
/* On recent NetBSD releases the emalloc, estrdup ... calls had been introduced in libutil */
53-
# include <sys/termios.h>
51+
# elif defined(__NetBSD__) || defined(__DragonFly__)
52+
/* On recent NetBSD/DragonFlyBSD releases the emalloc, estrdup ... calls had been introduced in libutil */
53+
# if defined(__NetBSD__)
54+
# include <sys/termios.h>
55+
# else
56+
# include <termios.h>
57+
# endif
5458
extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
5559
# else
5660
/* Mac OS X (and some BSDs) define `openpty` in <util.h> */

0 commit comments

Comments
 (0)