mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-24 02:23:27 +08:00
Fix compilation with old versions of MSVC.
Some old versions of MSVC have broken C preprocessors and failed to handle #ifdef/#else/#endif in the middle of a macro call. Just
This commit is contained in:
parent
d08b4abef4
commit
48d8b05b1c
12
print-ahcp.c
12
print-ahcp.c
@ -150,13 +150,11 @@ ahcp_ipv6_addresses_print(netdissect_options *ndo, const u_char *cp, const u_cha
|
|||||||
if (cp + 16 > ep)
|
if (cp + 16 > ep)
|
||||||
goto corrupt;
|
goto corrupt;
|
||||||
ND_TCHECK2(*cp, 16);
|
ND_TCHECK2(*cp, 16);
|
||||||
ND_PRINT((ndo, "%s%s", sep,
|
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
ip6addr_string(cp)
|
ND_PRINT((ndo, "%s%s", sep, ip6addr_string(cp)));
|
||||||
#else
|
#else
|
||||||
"(compiled w/o IPv6)"
|
ND_PRINT((ndo, "%s(compiled w/o IPv6)", sep));
|
||||||
#endif /* INET6 */
|
#endif /* INET6 */
|
||||||
));
|
|
||||||
cp += 16;
|
cp += 16;
|
||||||
sep = ", ";
|
sep = ", ";
|
||||||
}
|
}
|
||||||
@ -202,13 +200,11 @@ ahcp_ipv6_prefixes_print(netdissect_options *ndo, const u_char *cp, const u_char
|
|||||||
if (cp + 17 > ep)
|
if (cp + 17 > ep)
|
||||||
goto corrupt;
|
goto corrupt;
|
||||||
ND_TCHECK2(*cp, 17);
|
ND_TCHECK2(*cp, 17);
|
||||||
ND_PRINT((ndo, "%s%s/%u", sep,
|
|
||||||
#ifdef INET6
|
#ifdef INET6
|
||||||
ip6addr_string(cp),
|
ND_PRINT((ndo, "%s%s/%u", sep, ip6addr_string(cp), *(cp + 16)));
|
||||||
#else
|
#else
|
||||||
"(compiled w/o IPv6)",
|
ND_PRINT((ndo, "%s(compiled w/o IPv6)/%u", sep, *(cp + 16)));
|
||||||
#endif /* INET6 */
|
#endif /* INET6 */
|
||||||
*(cp + 16)));
|
|
||||||
cp += 17;
|
cp += 17;
|
||||||
sep = ", ";
|
sep = ", ";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user