Nmap Development mailing list archives

[Patch] C99 feature in ncat/ncat_core.c


From: "Gisle Vanem" <gvanem () yahoo no>
Date: Wed, 12 Feb 2014 10:24:36 +0100

MSVC v16 (from Visual C Express 2010) doesn't support the C99 feature of data declaration after code. Hence a simple patch I hope you can accept:

--- SVN-Latest/ncat/ncat_core.c    2014-02-10 05:12:43 +0000
+++ ncat/ncat_core.c 2014-02-12 10:03:24 +0000
@@ -544,11 +544,11 @@
int getaddrfamily(const char *addr)
{
    int ret;
+    struct addrinfo hint, *info =0;

    if (strchr(addr,':'))
      return 2;

-    struct addrinfo hint, *info =0;
    zmem(&hint,sizeof(hint));
    hint.ai_family = AF_UNSPEC;
    hint.ai_flags = AI_NUMERICHOST;

--gv
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: