Open williamtu opened 3 years ago
https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-ntohl
ntohl returns u_long
maybe
diff --git a/lib/packets.h b/lib/packets.h
index 515bb59b1..d227031f7 100644
--- a/lib/packets.h
+++ b/lib/packets.h
@@ -625,10 +625,10 @@ mpls_lse_to_bos(ovs_be32 mpls_lse)
#define IP_FMT "%"PRIu32".%"PRIu32".%"PRIu32".%"PRIu32
#define IP_ARGS(ip) \
- ntohl(ip) >> 24, \
- (ntohl(ip) >> 16) & 0xff, \
- (ntohl(ip) >> 8) & 0xff, \
- ntohl(ip) & 0xff
+ (u_int)(ntohl(ip) >> 24), \
+ (u_int)((ntohl(ip) >> 16) & 0xff), \
+ (u_int)((ntohl(ip) >> 8) & 0xff), \
+ (u_int)(ntohl(ip) & 0xff)
/* Example:
*