diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 00a7428b998..8c15128c265 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -51,6 +51,10 @@ #include #endif +#ifdef HAVE_LIBICONV +#undef iconv +#endif + #include "ext/standard/php_smart_str.h" #include "ext/standard/base64.h" #include "ext/standard/quot_print.h" @@ -117,6 +121,10 @@ typedef enum _php_iconv_enc_scheme_t { } php_iconv_enc_scheme_t; /* }}} */ +#ifdef HAVE_LIBICONV +#define iconv libiconv +#endif + /* {{{ prototypes */ static php_iconv_err_t _php_iconv_appendl(smart_str *d, const char *s, size_t l, iconv_t cd); static php_iconv_err_t _php_iconv_appendc(smart_str *d, const char c, iconv_t cd);