Package: libvirt / 5.0.0-4

test-posix_openpt-don-t-fail-on-EACCESS.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
Date: Thu, 19 Jan 2017 17:19:38 +0100
Subject: test-posix_openpt: don't fail on EACCESS

In chroots created with recent debootstrap /dev/ptmx might not be accessible.

Works around #817236
---
 gnulib/tests/test-posix_openpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib/tests/test-posix_openpt.c b/gnulib/tests/test-posix_openpt.c
index 32f518c..f55d281 100644
--- a/gnulib/tests/test-posix_openpt.c
+++ b/gnulib/tests/test-posix_openpt.c
@@ -43,7 +43,7 @@ main (void)
 
   /* Open the master of a pseudo-terminal pair.  */
   master = posix_openpt (O_RDWR | O_NOCTTY);
-  if (master < 0 && errno == ENOSYS)
+  if (master < 0 && (errno == ENOSYS || errno == EACCES))
     {
       fputs ("skipping: platform lacks pty support\n", stderr);
       return 77;