From eb9d2b00922c109c932eb339b2b2c92f04df06dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Fri, 19 Feb 2016 16:57:39 +0000 Subject: Fix implicit conversion from 64 to 32 bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change size_t to something that is guaranteed to fit in a socklen_t. Fix incorrect AC_DEFINE too. Change-Id: I710f32fb1e5bd4f51843d380aa8ed8b6acd98c02 Reviewed-on: https://code.wireshark.org/review/14009 Petri-Dish: Alexis La Goutte Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde --- wsutil/inet_addr-int.h | 4 ++++ wsutil/inet_addr.c | 4 ++-- wsutil/inet_addr.h | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'wsutil') diff --git a/wsutil/inet_addr-int.h b/wsutil/inet_addr-int.h index 631787dfca..c71b1cd4ad 100644 --- a/wsutil/inet_addr-int.h +++ b/wsutil/inet_addr-int.h @@ -28,6 +28,10 @@ #include #endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif + #ifdef HAVE_SYS_SOCKET_H #include /* needed to define AF_ values on UNIX */ #endif diff --git a/wsutil/inet_addr.c b/wsutil/inet_addr.c index b5f4cea62e..d56c955def 100644 --- a/wsutil/inet_addr.c +++ b/wsutil/inet_addr.c @@ -36,7 +36,7 @@ _inet_pton(int af, const gchar *src, gpointer dst) } const gchar * -ws_inet_ntop4(gconstpointer src, gchar *dst, gsize dst_size) +ws_inet_ntop4(gconstpointer src, gchar *dst, guint dst_size) { return inet_ntop(AF_INET, src, dst, dst_size); } @@ -48,7 +48,7 @@ ws_inet_pton4(const gchar *src, guint32 *dst) } const gchar * -ws_inet_ntop6(gconstpointer src, gchar *dst, gsize dst_size) +ws_inet_ntop6(gconstpointer src, gchar *dst, guint dst_size) { return inet_ntop(AF_INET6, src, dst, dst_size); } diff --git a/wsutil/inet_addr.h b/wsutil/inet_addr.h index 330f6e0d88..6cf43a1cd9 100644 --- a/wsutil/inet_addr.h +++ b/wsutil/inet_addr.h @@ -29,13 +29,13 @@ #include WS_DLL_PUBLIC const gchar * -ws_inet_ntop4(gconstpointer src, gchar *dst, gsize dst_size); +ws_inet_ntop4(gconstpointer src, gchar *dst, guint dst_size); WS_DLL_PUBLIC gboolean ws_inet_pton4(const gchar *src, guint32 *dst); WS_DLL_PUBLIC const gchar * -ws_inet_ntop6(gconstpointer src, gchar *dst, gsize dst_size); +ws_inet_ntop6(gconstpointer src, gchar *dst, guint dst_size); WS_DLL_PUBLIC gboolean ws_inet_pton6(const gchar *src, struct e_in6_addr *dst); -- cgit v1.2.3