From: Amos Jeffries Date: Mon, 12 Jan 2015 14:27:01 +0000 (-0800) Subject: Portability: skip redefinition of inet_ntop/inet_pton X-Git-Tag: merge-candidate-3-v1~356 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4dbe7028cab8484b2a5167aee078594434da684b;p=thirdparty%2Fsquid.git Portability: skip redefinition of inet_ntop/inet_pton ... even if ./configure detects their absence they may be pulled in from elsewhere. Such as our own compat/os/ headers (eg. on Windows). --- diff --git a/compat/inet_ntop.h b/compat/inet_ntop.h index 7ae80a9691..0d42ef25c9 100644 --- a/compat/inet_ntop.h +++ b/compat/inet_ntop.h @@ -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 */ diff --git a/compat/inet_pton.h b/compat/inet_pton.h index 30f563ecc1..4dbbccf7a5 100644 --- a/compat/inet_pton.h +++ b/compat/inet_pton.h @@ -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 */