Nmap Development mailing list archives

[PATCH] EPIPE halts nsock compilation on windows


From: jah <jah () zadkiel plus com>
Date: Wed, 04 Mar 2009 00:43:49 +0000

Hi folks,

Building Nmap for Windows and getting:

Compiling...
nsock_core.c
.\src\nsock_core.c(288) : error C2065: 'EPIPE' : undeclared identifier
.\src\nsock_core.c(288) : error C2051: case expression not constant

The attached wraps ifndef WIN32 around this particular case since I'm
not sure if this is only needed for Linux or if it might crop-up for
other OSs.
Builds just lovely after application.


Regards,

jah

--- nsock_core.c.orig   2009-03-04 00:41:05.720625000 +0000
+++ nsock_core.c        2009-03-04 00:34:49.111250000 +0000
@@ -285,10 +285,12 @@
     case ETIMEDOUT:
     case EHOSTDOWN:
     case ECONNRESET:
+#ifndef WIN32
     case EPIPE: /* Has been seen after connect on Linux. */
       nse->status = NSE_STATUS_ERROR;
       nse->errnum = optval;
       break;
+#endif
     default:
       Snprintf(buf, sizeof(buf), "Strange connect error from %s (%d)", inet_ntop_ez(&iod->peer, iod->peerlen), optval);
       perror(buf);

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Current thread: