]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability: skip redefinition of inet_ntop/inet_pton
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 12 Jan 2015 14:27:01 +0000 (06:27 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 12 Jan 2015 14:27:01 +0000 (06:27 -0800)
... even if ./configure detects their absence they may be pulled in from
elsewhere. Such as our own compat/os/ headers (eg. on Windows).

compat/inet_ntop.h
compat/inet_pton.h

index 7ae80a9691d73bdb09bd6c055def43135e0d5da9..0d42ef25c98c6b615373871cda6044e5f77329e8 100644 (file)
@@ -21,7 +21,9 @@
 *      Paul Vixie, 1996.
 */
 SQUIDCEXTERN const char * xinet_ntop(int af, const void *src, char *dst, size_t size);
+#ifndef inet_ntop
 #define inet_ntop xinet_ntop
+#endif
 
 #endif /* HAVE_DECL_INET_NTOP */
 #endif /* _INC_INET_NTOP_H */
index 30f563ecc1d0d8cbbbd083adb00bc1644635bc3c..4dbbccf7a5401c9973982ea80e2f8fdc35b2f024 100644 (file)
@@ -24,7 +24,9 @@
 *      Paul Vixie, 1996.
 */
 SQUIDCEXTERN int xinet_pton(int af, const char *src, void *dst);
+#ifndef inet_pton
 #define inet_pton xinet_pton
+#endif
 
 #endif /* HAVE_DECL_INET_PTON */
 #endif /* _INC_INET_NTOP_H */