Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
relibc
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
Container Registry
Model registry
Operate
Environments
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
redox-os
relibc
Commits
018ff409
Verified
Commit
018ff409
authored
6 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Add gai_strerror
parent
543f32eb
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2517
failed
6 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/header/netdb/mod.rs
+16
-1
16 additions, 1 deletion
src/header/netdb/mod.rs
with
16 additions
and
1 deletion
src/header/netdb/mod.rs
+
16
−
1
View file @
018ff409
...
@@ -1014,6 +1014,21 @@ pub extern "C" fn freeaddrinfo(res: *mut addrinfo) {
...
@@ -1014,6 +1014,21 @@ pub extern "C" fn freeaddrinfo(res: *mut addrinfo) {
unimplemented!
();
unimplemented!
();
}
}
#[no_mangle]
pub
extern
"C"
fn
gai_strerror
(
errcode
:
c_int
)
->
*
const
c_char
{
pub
extern
"C"
fn
gai_strerror
(
errcode
:
c_int
)
->
*
const
c_char
{
unimplemented!
();
match
errcode
{
EAI_BADFLAGS
=>
c_str!
(
"Invalid flags"
),
EAI_NONAME
=>
c_str!
(
"Name does not resolve"
),
EAI_AGAIN
=>
c_str!
(
"Try again"
),
EAI_FAIL
=>
c_str!
(
"Non-recoverable error"
),
EAI_NODATA
=>
c_str!
(
"Unknown error"
),
EAI_FAMILY
=>
c_str!
(
"Unrecognized address family or invalid length"
),
EAI_SOCKTYPE
=>
c_str!
(
"Unrecognized socket type"
),
EAI_SERVICE
=>
c_str!
(
"Unrecognized service"
),
EAI_ADDRFAMILY
=>
c_str!
(
"Address family for name not supported"
),
EAI_MEMORY
=>
c_str!
(
"Out of memory"
),
EAI_SYSTEM
=>
c_str!
(
"System error"
),
EAI_OVERFLOW
=>
c_str!
(
"Overflow"
),
_
=>
c_str!
(
"Unknown error"
),
}
.as_ptr
()
}
}
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