diff options
Diffstat (limited to 'regress/lib/libpthread/poll/poll.c')
-rw-r--r-- | regress/lib/libpthread/poll/poll.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/regress/lib/libpthread/poll/poll.c b/regress/lib/libpthread/poll/poll.c index 4b76bd7d858..979d2916d9a 100644 --- a/regress/lib/libpthread/poll/poll.c +++ b/regress/lib/libpthread/poll/poll.c @@ -1,4 +1,4 @@ -/* $OpenBSD: poll.c,v 1.4 2003/07/31 21:48:05 deraadt Exp $ */ +/* $OpenBSD: poll.c,v 1.5 2016/09/20 17:04:35 otto Exp $ */ /* David Leonard <d@openbsd.org>, 2001. Public Domain. */ #include <pthread.h> @@ -7,6 +7,7 @@ #include <paths.h> #include <unistd.h> #include <stdlib.h> +#include <util.h> #include "test.h" @@ -54,7 +55,7 @@ main(int argc, char *argv[]) { pthread_t t; void *result; - int null, zero, tty; + int null, zero, tty, dummy; int tube[2]; struct pollfd p[3]; @@ -63,7 +64,7 @@ main(int argc, char *argv[]) CHECKe(zero = open(_PATH_DEV "zero", O_RDONLY)); CHECKe(null = open(_PATH_DEV "null", O_WRONLY)); - CHECKe(tty = open(_PATH_DEV "tty", O_WRONLY)); + CHECKe(openpty(&tty, &dummy, NULL, NULL, NULL)); /* Try both descriptors being ready */ p[0].fd = zero; |