Skip to content

getaddrinfo conversion #15555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 0 additions & 196 deletions build/ax_func_which_gethostbyname_r.m4

This file was deleted.

3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dnl Include external macro definitions before the AC_INIT to also remove
dnl comments starting with # and empty newlines from the included files.
dnl ----------------------------------------------------------------------------
m4_include([build/ax_check_compile_flag.m4])
m4_include([build/ax_func_which_gethostbyname_r.m4])
m4_include([build/ax_gcc_func_attribute.m4])
m4_include([build/libtool.m4])
m4_include([build/php_cxx_compile_stdcxx.m4])
Expand Down Expand Up @@ -600,8 +599,6 @@ dnl Check for functions inside their belonging headers.
AC_CHECK_HEADER([sys/prctl.h], [AC_CHECK_FUNCS([prctl])])
AC_CHECK_HEADER([sys/procctl.h], [AC_CHECK_FUNCS([procctl])])

AX_FUNC_WHICH_GETHOSTBYNAME_R

dnl Some systems (Solaris 10) do not have nanosleep in libc.
AC_CHECK_FUNCS([nanosleep],,
[AC_SEARCH_LIBS([nanosleep], [rt], [AC_DEFINE([HAVE_NANOSLEEP], [1])])])
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/tests/curl_basic_008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ curl
--SKIPIF--
<?php
$addr = "www.".uniqid().".invalid";
if (gethostbyname($addr) != $addr) {
if (@gethostbyname($addr) != $addr) {
print "skip catch all dns";
}
?>
Expand Down
2 changes: 1 addition & 1 deletion ext/curl/tests/curl_basic_010.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ curl
--SKIPIF--
<?php
$addr = "www.".uniqid().".".uniqid();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely we could try to come up with something that we know does not exist? Like a weird subdomain name of php.net

if (gethostbyname($addr) != $addr) {
if (@gethostbyname($addr) != $addr) {
print "skip catch all dns";
}
?>
Expand Down
2 changes: 1 addition & 1 deletion ext/snmp/snmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ static bool netsnmp_session_init(php_snmp_session **session_p, int version, zend
php_snmp_session *session;
char *pptr, *host_ptr;
bool force_ipv6 = false;
int n;
size_t n;
struct sockaddr **psal;
struct sockaddr **res;
// TODO: Do not strip and re-add the port in peername?
Expand Down
4 changes: 2 additions & 2 deletions ext/sockets/conversions.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ static void to_zval_read_uid_t(const char *data, zval *zv, res_context *ctx)
/* CONVERSIONS for sockaddr */
static void from_zval_write_sin_addr(const zval *zaddr_str, char *inaddr, ser_context *ctx)
{
int res;
bool res;
struct sockaddr_in saddr = {0};
zend_string *addr_str, *tmp_addr_str;

Expand Down Expand Up @@ -600,7 +600,7 @@ static void to_zval_read_sockaddr_in(const char *data, zval *zv, res_context *ct
#ifdef HAVE_IPV6
static void from_zval_write_sin6_addr(const zval *zaddr_str, char *addr6, ser_context *ctx)
{
int res;
bool res;
struct sockaddr_in6 saddr6 = {0};
zend_string *addr_str, *tmp_addr_str;

Expand Down
Loading
Loading