Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5160 differently:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 15 Sep 2010 15:13:40 +0000 (15:13 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 15 Sep 2010 15:13:40 +0000 (15:13 +0000)
On Windows, rename inet_pton() to ws_inet_pton() so that builds on Vista or
later systems (that have inet_pton() natively) will still work on pre-Vista
systems.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34122 f5534014-38df-0310-8fa8-9805f1628bb7

wsutil/inet_v6defs.h
wsutil/libwsutil.def

index dc770f89c5e24e4f08d87cb80a203b8d4ce1d9b3..f02faf0f7e3c0c21151b28d4615187182f7dc920 100644 (file)
  * Versions of "inet_pton()" and "inet_ntop()", for the benefit of OSes that
  * don't have it.
  */
+
+/*  Windows does not have inet_pton() until Vista.  In order to allow binaries
+ *  compiled on Vista or later to work on pre-Vista Windows (without resorting
+ *  to fragile link ordering tricks), we rename our inet_pton() to
+ *  ws_inet_pton().
+ */
+#ifdef WIN32
+#define inet_pton ws_inet_pton
+#endif
+
 extern int inet_pton(int af, const char *src, void *dst);
 #ifndef HAVE_INET_NTOP_PROTO
 extern const char *inet_ntop(int af, const void *src, char *dst,
index e0e02021872ed291640e6444bebce638fd5372e9..7bb5ae2aaf1b9fcf6c627e09ca4df8d5e6dce985 100644 (file)
@@ -29,7 +29,8 @@ inet_aton
 inet_ntop
 
 ; inet_pton.c
-inet_pton
+; Note: inet_v6defs.h renames this function for Windows (only)
+ws_inet_pton
 
 ; mpeg-audio.c
 mpa_bitrate