diff options
author | foobar <sniper@php.net> | 2002-12-09 11:50:15 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2002-12-09 11:50:15 +0000 |
commit | 085f362ae309e39eb754963ffdf3bea6b8bc6507 (patch) | |
tree | 06af44724ab3ec73ae09c65a20467fdc0256dafd | |
parent | ba5764ab39208349fb4f29cf6ed7bb943875c744 (diff) | |
download | php-git-085f362ae309e39eb754963ffdf3bea6b8bc6507.tar.gz |
T_AAAA is not always available.
-rw-r--r-- | ext/standard/dns.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/dns.c b/ext/standard/dns.c index cf3dc75796..1479b06177 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -241,7 +241,9 @@ PHP_FUNCTION(dns_check_record) else if (!strcasecmp("ANY", Z_STRVAL_PP(arg2))) type = T_ANY; else if (!strcasecmp("SOA", Z_STRVAL_PP(arg2))) type = T_SOA; else if (!strcasecmp("CNAME", Z_STRVAL_PP(arg2))) type = T_CNAME; +#ifdef T_AAAA else if (!strcasecmp("AAAA", Z_STRVAL_PP(arg2))) type = T_AAAA; +#endif else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type '%s' not supported", Z_STRVAL_PP(arg2)); RETURN_FALSE; @@ -420,6 +422,8 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int GETLONG(n, cp); add_assoc_long(*subarray, "minimum-ttl", n); break; + +#ifdef T_AAAA case T_AAAA: tp = name; for(i=0; i < 8; i++) { @@ -444,6 +448,8 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int add_assoc_string(*subarray, "type", "AAAA", 1); add_assoc_string(*subarray, "ipv6", name, 1); break; +#endif + default: cp += dlen; } @@ -542,9 +548,11 @@ PHP_FUNCTION(dns_get_record) case 7: type_to_fetch = type_param&PHP_DNS_TXT ? T_TXT : 0; break; +#ifdef T_AAAA case 8: type_to_fetch = type_param&PHP_DNS_AAAA ? T_AAAA : 0; break; +#endif case 9: store_results = 0; continue; |