com php-src: proc_open/openpty: DragonFlyBSD build fi x.: ext/standard/proc_open.c
| From: | Nikita Popov | Date: | Mon, 10 Aug 2020 07:49:18 +0000 |
| Subject: | com php-src: proc_open/openpty: DragonFlyBSD build fi x.: ext/standard/proc_open.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112622@lists.php.net to get a copy of this message | ||
Commit: cedf463d1b677e60c5fce516bb52cc6cc79996ae
Author: David Carlier <devnexen@gmail.com> Sat, 8 Aug 2020 17:30:15 +0100
Committer: Nikita Popov <nikita.ppv@gmail.com> Mon, 10 Aug 2020 09:49:18 +0200
Parents: a41cf3e1d2ed3ae38ad6115a8b65e5f14dae0b49
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cedf463d1b677e60c5fce516bb52cc6cc79996ae
Log:
proc_open/openpty: DragonFlyBSD build fix.
Similarly to NetBSD emalloc-ish api had been introduced into libutil.
Closes GH-5960.
Changed paths:
M ext/standard/proc_open.c
Diff:
diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c
index 5e7a782471f..2f5d15d7387 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> */