Nmap Development mailing list archives

BUG REPORT: nsock/include/nsock.h SUN_LEN macro


From: Conor McCarthy <mr.spuratic () gmail com>
Date: Mon, 24 Dec 2012 13:52:39 +0000

Hi,
 regarding the "Implementation-of-UNIX-domain-sockets-for-Nsock" patch:
http://seclists.org/nmap-dev/2012/q4/att-24/0001-Implementation-of-UNIX-domain-sockets-for-Nsock.patch

The fallback SUN_LEN macro is missing an opening bracket:
[...]
+#ifndef SUN_LEN
+#include <string.h>
+# define SUN_LEN(ptr) (sizeof(*(ptr)) - sizeof((ptr)->sun_path))     \
+                      + strlen ((ptr)->sun_path))
+#endif

This causes (at least) an ncat compilation failure on systems without a
natively defined SUN_LEN, specifically Solaris.

Trivial patch attached.

Thanks,
 C.

Attachment: nsock_sun_len.diff
Description:

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

Current thread: