pike.git / src / modules / _Stdio / file.c

version» Context lines:

pike.git/src/modules/_Stdio/file.c:4890: Inside #if defined(IPV6_V6ONLY) && defined(IPPROTO_IPV6)
   */    o = 0;    fd_setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&o, sizeof(int));    }   #endif      #ifdef SO_REUSEPORT    /* FreeBSD 7.x wants this to reuse portnumbers.    * Linux 2.6.x seems to have reserved a slot for the option, but not    * enabled it. Survive libc's with the option on kernels without. +  * +  * The emulated Linux runtime on MS Windows 10 fails this with EINVAL.    */    o=1;    if((fd_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (char *)&o, sizeof(int)) < 0)   #ifdef ENOPROTOOPT    && (errno != ENOPROTOOPT)   #endif -  + #ifdef EINVAL +  && (errno != EINVAL) + #endif   #ifdef WSAENOPROTOOPT    && (errno != WSAENOPROTOOPT)   #endif   ){    ERRNO=errno;    while (fd_close(fd) && errno == EINTR) {}    errno = ERRNO;    pop_n_elems(args);    push_int(0);    return;
pike.git/src/modules/_Stdio/file.c:4951: Inside #if defined(IPV6_V6ONLY) && defined(IPPROTO_IPV6)
   */    o = 0;    fd_setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&o, sizeof(int));    }   #endif      #ifdef SO_REUSEPORT    /* FreeBSD 7.x wants this to reuse portnumbers.    * Linux 2.6.x seems to have reserved a slot for the option, but not    * enabled it. Survive libc's with the option on kernels without. +  * +  * The emulated Linux runtime on MS Windows 10 fails this with EINVAL.    */    o=1;    if((fd_setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (char *)&o, sizeof(int)) < 0)   #ifdef ENOPROTOOPT    && (errno != ENOPROTOOPT)   #endif -  + #ifdef EINVAL +  && (errno != EINVAL) + #endif   #ifdef WSAENOPROTOOPT    && (errno != WSAENOPROTOOPT)   #endif   ){    ERRNO=errno;    while (fd_close(fd) && errno == EINTR) {}    errno = ERRNO;    pop_n_elems(args);    push_int(0);    return;