Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
c964aedf
Commit
c964aedf
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
Only compile the ipv6-section for ipv6-enabled libcurls. Should save
us some trouble.
parent
5f4fb857
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/inet_pton.c
+9
-4
9 additions, 4 deletions
lib/inet_pton.c
with
9 additions
and
4 deletions
lib/inet_pton.c
+
9
−
4
View file @
c964aedf
...
...
@@ -42,10 +42,6 @@
#define INADDRSZ 4
#define INT16SZ 2
#ifndef AF_INET6
#define AF_INET6 AF_MAX+1
/* just to let this compile */
#endif
#ifdef WIN32
#define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
...
...
@@ -56,7 +52,9 @@
*/
static
int
inet_pton4
(
const
char
*
src
,
unsigned
char
*
dst
);
#ifdef ENABLE_IPV6
static
int
inet_pton6
(
const
char
*
src
,
unsigned
char
*
dst
);
#endif
/* int
* inet_pton(af, src, dst)
...
...
@@ -78,8 +76,13 @@ Curl_inet_pton(af, src, dst)
switch
(
af
)
{
case
AF_INET
:
return
(
inet_pton4
(
src
,
dst
));
#ifdef ENABLE_IPV6
#ifndef AF_INET6
#define AF_INET6 AF_MAX+1
/* just to let this compile */
#endif
case
AF_INET6
:
return
(
inet_pton6
(
src
,
dst
));
#endif
default:
errno
=
EAFNOSUPPORT
;
return
(
-
1
);
...
...
@@ -138,6 +141,7 @@ inet_pton4(src, dst)
return
(
1
);
}
#ifdef ENABLE_IPV6
/* int
* inet_pton6(src, dst)
* convert presentation level address to network order binary form.
...
...
@@ -236,5 +240,6 @@ inet_pton6(src, dst)
memcpy
(
dst
,
tmp
,
IN6ADDRSZ
);
return
(
1
);
}
#endif
/* ENABLE_IPV6 */
#endif
/* HAVE_INET_PTON */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment