-Wall is intolerably noisy with icc.
[p5sagit/p5-mst-13.2.git] / win32 / win32sck.c
index 58b13e0..051b442 100644 (file)
@@ -312,11 +312,11 @@ win32_select(int nfds, Perl_fd_set* rd, Perl_fd_set* wr, Perl_fd_set* ex, const
     for (i = 0; i < nfds; i++) {
        fd = TO_SOCKET(i);
        if (PERL_FD_ISSET(i,rd))
-           FD_SET(fd, &nrd);
+           FD_SET((unsigned)fd, &nrd);
        if (PERL_FD_ISSET(i,wr))
-           FD_SET(fd, &nwr);
+           FD_SET((unsigned)fd, &nwr);
        if (PERL_FD_ISSET(i,ex))
-           FD_SET(fd, &nex);
+           FD_SET((unsigned)fd, &nex);
     }
 
     errno = save_errno;
@@ -426,7 +426,8 @@ open_ifs_socket(int af, int type, int protocol)
 
                 if ((af != AF_UNSPEC && af != proto_buffers[i].iAddressFamily)
                     || (type != proto_buffers[i].iSocketType)
-                    || (protocol != 0 && protocol != proto_buffers[i].iProtocol))
+                    || (protocol != 0 && proto_buffers[i].iProtocol != 0 &&
+                        protocol != proto_buffers[i].iProtocol))
                     continue;
 
                 if ((proto_buffers[i].dwServiceFlags1 & XP1_IFS_HANDLES) == 0)