]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
cltfd is only needed when select is being used
authorMark Andrews <marka@isc.org>
Thu, 25 Aug 2011 08:17:54 +0000 (08:17 +0000)
committerMark Andrews <marka@isc.org>
Thu, 25 Aug 2011 08:17:54 +0000 (08:17 +0000)
lib/isc/unix/socket.c

index aa0227c87a26ddbba112ccf4a16e0a512701812c..834f7dbcd942d34a1ef9ad1bd64a0d6cc58f5083 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.346 2011/08/24 23:17:52 marka Exp $ */
+/* $Id: socket.c,v 1.347 2011/08/25 08:17:54 marka Exp $ */
 
 /*! \file */
 
@@ -3784,7 +3784,6 @@ static isc_threadresult_t
 watcher(void *uap) {
        isc__socketmgr_t *manager = uap;
        isc_boolean_t done;
-       int ctlfd;
        int cc;
 #ifdef USE_KQUEUE
        const char *fnname = "kevent()";
@@ -3796,16 +3795,21 @@ watcher(void *uap) {
 #elif defined (USE_SELECT)
        const char *fnname = "select()";
        int maxfd;
+       int ctlfd;
 #endif
        char strbuf[ISC_STRERRORSIZE];
 #ifdef ISC_SOCKET_USE_POLLWATCH
        pollstate_t pollstate = poll_idle;
 #endif
 
+       isc_os_minprivs();
+
+#if defined (USE_SELECT)
        /*
         * Get the control fd here.  This will never change.
         */
        ctlfd = manager->pipe_fds[0];
+#endif
        done = ISC_FALSE;
        while (!done) {
                do {