summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-misc.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-06-04 18:39:48 +1000
committerDarren Tucker <dtucker@dtucker.net>2021-06-04 18:39:48 +1000
commitc8677065070ee34c05c7582a9c2f58d8642e552d (patch)
treee574f75ddc796ef0d7527ed6fcc634f66910991c /openbsd-compat/bsd-misc.h
parent7cd7f302d3a072748299f362f9e241d81fcecd26 (diff)
downloadopenssh-git-c8677065070ee34c05c7582a9c2f58d8642e552d.tar.gz
Add pselect implementation for platforms without.
This is basically the existing notify_pipe kludge from serverloop.c moved behind a pselect interface. It works by installing a signal handler that writes to a pipe that the select is watching, then calls the original handler. The select call in serverloop will become pselect soon, at which point the kludge will be removed from thereand will only exist in the compat layer. Original code by markus, help from djm.
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r--openbsd-compat/bsd-misc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 3a7dd6f4..def64238 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -125,6 +125,11 @@ int isblank(int);
pid_t getpgid(pid_t);
#endif
+#ifndef HAVE_PSELECT
+int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *,
+ const sigset_t *);
+#endif
+
#ifndef HAVE_ENDGRENT
# define endgrent() do { } while(0)
#endif