poppler: Update from 0.34 to 0.35
[termux-packages] / packages / apt / dpkgpm.cc.patch
CommitLineData
59f0d218
FF
1diff -u -r ../apt-1.0.9.4/apt-pkg/deb/dpkgpm.cc ./apt-pkg/deb/dpkgpm.cc
2--- ../apt-1.0.9.4/apt-pkg/deb/dpkgpm.cc 2014-12-03 10:06:58.000000000 -0500
3+++ ./apt-pkg/deb/dpkgpm.cc 2014-12-07 07:17:09.210804305 -0500
4@@ -27,7 +27,9 @@
5 #include <errno.h>
6 #include <fcntl.h>
7 #include <grp.h>
8-#include <pty.h>
9+#ifndef __ANDROID__
10+# include <pty.h>
11+#endif
12 #include <pwd.h>
13 #include <signal.h>
14 #include <stddef.h>
15@@ -1075,7 +1077,11 @@
16
17 _error->PushToStack();
18
19+#ifdef __ANDROID__
20+ d->master = open("/dev/ptmx", O_RDWR | O_NOCTTY);
21+# else
22 d->master = posix_openpt(O_RDWR | O_NOCTTY);
23+#endif
24 if (d->master == -1)
25 _error->Errno("posix_openpt", _("Can not write log (%s)"), _("Is /dev/pts mounted?"));
26 else if (unlockpt(d->master) == -1)