Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
94564346
Commit
94564346
authored
Nov 08, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some fixes for SCO in new getaddrinfo() code.
parent
268da816
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
getaddrinfo.c
lib/getaddrinfo.c
+10
-3
No files found.
lib/getaddrinfo.c
View file @
94564346
...
@@ -53,8 +53,15 @@ TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
...
@@ -53,8 +53,15 @@ TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#define SMB_STRDUP(s) strdup(s)
#define SMB_STRDUP(s) strdup(s)
#endif
#endif
#ifndef HOST_NAME_MAX
#define HOST_NAME_MAX 255
#endif
static
int
check_hostent_err
(
struct
hostent
*
hp
)
static
int
check_hostent_err
(
struct
hostent
*
hp
)
{
{
#ifndef INET6
extern
int
h_errno
;
#endif
if
(
!
hp
)
{
if
(
!
hp
)
{
switch
(
h_errno
)
{
switch
(
h_errno
)
{
case
HOST_NOT_FOUND
:
case
HOST_NOT_FOUND
:
...
@@ -399,8 +406,8 @@ static int gethostnameinfo(const struct sockaddr *sa,
...
@@ -399,8 +406,8 @@ static int gethostnameinfo(const struct sockaddr *sa,
if
(
!
(
flags
&
NI_NUMERICHOST
))
{
if
(
!
(
flags
&
NI_NUMERICHOST
))
{
struct
hostent
*
hp
=
gethostbyaddr
(
struct
hostent
*
hp
=
gethostbyaddr
(
&
((
struct
sockaddr_in
*
)
sa
)
->
sin_addr
,
(
void
*
)
&
((
struct
sockaddr_in
*
)
sa
)
->
sin_addr
,
sizeof
(
struct
in_addr
),
sizeof
(
struct
in_addr
),
sa
->
sa_family
);
sa
->
sa_family
);
ret
=
check_hostent_err
(
hp
);
ret
=
check_hostent_err
(
hp
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
...
@@ -481,7 +488,7 @@ int getnameinfo(const struct sockaddr *sa, socklen_t salen,
...
@@ -481,7 +488,7 @@ int getnameinfo(const struct sockaddr *sa, socklen_t salen,
return
EAI_FAIL
;
return
EAI_FAIL
;
}
}
if
(
salen
<
sizeof
(
struct
sockaddr_in
))
{
if
(
salen
<
(
socklen_t
)
sizeof
(
struct
sockaddr_in
))
{
return
EAI_FAIL
;
return
EAI_FAIL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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