free_url(resource);
if (location[0] != '\0') {
zval **response_header_new, *entry, **entryp;
+ ELS_FETCH();
fp = php_fopen_url_wrap_http(location, mode, options, issock, socketd, opened_path);
- ELS_FETCH();
if (zend_hash_find(EG(active_symbol_table), "http_response_header", sizeof("http_response_header"), (void **) &response_header_new) == SUCCESS) {
entryp = &entry;
MAKE_STD_ZVAL(entry);
# define SOCK_CONN_ERR -1
#endif
+#ifdef HAVE_GETADDRINFO
#ifdef HAVE_GAI_STRERROR
# define PHP_GAI_STRERROR(x) (gai_strerror(x))
#else
# define PHP_GAI_STRERROR(x) (php_gai_strerror(x))
-static char *php_gai_strerror(int code) {
+static char *php_gai_strerror(int code)
+{
static struct {
int code;
const char *msg;
return "Unknown error";
}
#endif
+#endif
static void php_network_freeaddresses(struct sockaddr **sal)
{