Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
openldap
OpenLDAP
Commits
ca52123a
Commit
ca52123a
authored
Apr 21, 2003
by
Kurt Zeilenga
Browse files
Fix builds when getaddrinfo is not detected but getnameinfo is.
This does not happen normally.
parent
e061628f
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/ac/socket.h
View file @
ca52123a
...
...
@@ -192,7 +192,7 @@ LDAP_F (int) ldap_pvt_inet_aton LDAP_P(( const char *, struct in_addr * ));
# define INET6_ADDRSTRLEN 46
#endif
#ifdef HAVE_GETADDRINFO
#if
def
ined(
HAVE_GETADDRINFO
) || defined( HAVE_GETNAMEINFO )
# ifdef HAVE_GAI_STRERROR
# define AC_GAI_STRERROR(x) (gai_strerror((x)))
# else
...
...
libraries/libldap/os-ip.c
View file @
ca52123a
...
...
@@ -325,19 +325,22 @@ ldap_connect_to_host(LDAP *ld, Sockbuf *sb,
const
char
*
host
,
int
port
,
int
async
)
{
int
rc
;
int
socktype
;
ber_socket_t
s
=
AC_SOCKET_INVALID
;
int
rc
,
i
,
use_hp
=
0
;
struct
hostent
*
hp
=
NULL
;
#if defined( HAVE_GETADDRINFO ) && defined( HAVE_INET_NTOP )
char
serv
[
7
];
int
err
;
struct
addrinfo
hints
,
*
res
,
*
sai
;
#else
int
i
;
int
use_hp
=
0
;
struct
hostent
*
hp
=
NULL
;
struct
hostent
he_buf
;
struct
in_addr
in
;
#endif
char
*
ha_buf
=
NULL
,
*
p
,
*
q
;
int
socktype
;
#endif
if
(
host
==
NULL
)
host
=
"localhost"
;
...
...
libraries/libldap/util-int.c
View file @
ca52123a
...
...
@@ -539,7 +539,8 @@ char * ldap_pvt_get_fqdn( char *name )
return
fqdn
;
}
#if defined( HAVE_GETADDRINFO ) && !defined( HAVE_GAI_STRERROR )
#if ( defined( HAVE_GETADDRINFO ) || defined( HAVE_GETNAMEINFO ) ) \
&& !defined( HAVE_GAI_STRERROR )
char
*
ldap_pvt_gai_strerror
(
int
code
)
{
static
struct
{
int
code
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment