Skip to content

Commit 6dca024

Browse files
devnexenkocsismate
authored andcommitted
Build fix for newer versions of NetBSD.
its libutil contains newer conflicting apis as estrdup, emalloc. Closes GH-5635
1 parent 70b2aa7 commit 6dca024

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/standard/proc_open.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@
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>
54+
extern int openpty(int *, int *, char *, struct termios *, struct winsize *);
5155
# else
5256
/* Mac OS X (and some BSDs) define `openpty` in <util.h> */
5357
# include <util.h>

0 commit comments

Comments
 (0)