summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libresolv2/common/isc/eventlib.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/lib/libresolv2/common/isc/eventlib.c b/usr/src/lib/libresolv2/common/isc/eventlib.c
index ef9832c3b7..e4678e8099 100644
--- a/usr/src/lib/libresolv2/common/isc/eventlib.c
+++ b/usr/src/lib/libresolv2/common/isc/eventlib.c
@@ -733,7 +733,7 @@ pselect(int nfds, void *rfds, void *wfds, void *efds,
struct timespec *tsp,
const sigset_t *sigmask)
{
- struct timeval tv, *tvp;
+ struct timeval tv;
sigset_t sigs;
int n;
#ifdef USE_POLL
@@ -743,16 +743,18 @@ pselect(int nfds, void *rfds, void *wfds, void *efds,
nfds_t pnfds;
UNUSED(nfds);
+#else
+ struct timeval *tvp = NULL;
#endif /* USE_POLL */
if (tsp) {
- tvp = &tv;
tv = evTimeVal(*tsp);
#ifdef USE_POLL
polltimeout = 1000 * tv.tv_sec + tv.tv_usec / 1000;
+#else
+ tvp = &tv;
#endif /* USE_POLL */
- } else
- tvp = NULL;
+ }
if (sigmask)
sigprocmask(SIG_SETMASK, sigmask, &sigs);
#ifndef USE_POLL