add missing PHP_FEs
[m6w6/ext-ares] / php_ares.c
index 9d5c8096b2d2baadc4d17c7c7df6dd0dd772b37c..54b0f4cbbd2bf2517eb6d2f89e2b6e6bd24708ff 100644 (file)
@@ -1105,7 +1105,7 @@ static PHP_FUNCTION(ares_init)
                RETURN_FALSE;
        }
        
-       ares = emalloc(sizeof(php_ares));
+       ares = ecalloc(1, sizeof(php_ares));
        TSRMLS_SET_CTX(ares->tsrm_ls);
        zend_llist_init(&ares->queries, sizeof(php_ares_query *), (llist_dtor_func_t) php_ares_query_llist_dtor, 0);
        php_ares_options_ctor(&ares->options, opt_array ? Z_ARRVAL_P(opt_array) : NULL);
@@ -2256,6 +2256,15 @@ zend_function_entry ares_functions[] = {
        PHP_FE(ares_select, ai_ares_select)
        PHP_FE(ares_fds, ai_ares_fds)
        PHP_FE(ares_timeout, NULL)
+#ifdef HAVE_ARES_SET_LOCAL_DEV
+       PHP_FE(ares_set_local_dev, NULL)
+#endif
+#ifdef HAVE_ARES_SET_LOCAL_IP4
+       PHP_FE(ares_set_local_ip4, NULL)
+#endif
+#ifdef HAVE_ARES_SET_LOCAL_IP6
+       PHP_FE(ares_set_local_ip6, NULL)
+#endif
        {NULL, NULL, NULL}
 };
 /* }}} */