tcpdump mailing list archives
Re: print-ahcp.c on MSVC
From: "Gisle Vanem" <gvanem () yahoo no>
Date: Wed, 2 Apr 2014 19:23:07 +0200
"Gisle Vanem" <gvanem () yahoo no> wrote:
I'm sure my old MSVC v16 has a bit stupid C-preprocessor. At least when expanding this (line 153):
Now this C-preprocessor "bug" got me into problems with print-olsr.c too. A patch:
--- Git-Latest/print-olsr.c 2014-04-02 17:02:01 +0000 +++ print-olsr.c 2014-04-02 19:07:49 +0000 @@ -457,12 +457,15 @@ while (msg_tlen >= addr_size) { if (!ND_TTEST2(*msg_data, addr_size)) goto trunc; - - ND_PRINT((ndo, "\n\t interface address %s", #if INET6 + ND_PRINT((ndo, "\n\t interface address %s", is_ipv6 ? ip6addr_string(msg_data) : -#endif ipaddr_string(msg_data))); +#else + ND_PRINT((ndo, "\n\t interface address %s", + ipaddr_string(msg_data))); +#endif + msg_data += addr_size; msg_tlen -= addr_size; } ----BTW. It seems it's impossible to build with w/o "#define INET6". How is e.g. print-dhcp6.c supposed to be compiled on Windows w/o it? A '#ifdef INET6' surrounding the whole file?
I assume with autotools it's not compiled w/o INET6. Or? --gv _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Re: print-ahcp.c on MSVC Gisle Vanem (Apr 02)