Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libc
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
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
felixmoebius
libc
Commits
fd037479
Commit
fd037479
authored
5 years ago
by
FenrirWolf
Committed by
Fenrir
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Define newlib socket types by target arch
parent
4b610e63
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/unix/newlib/aarch64/mod.rs
+28
-0
28 additions, 0 deletions
src/unix/newlib/aarch64/mod.rs
src/unix/newlib/arm/mod.rs
+30
-0
30 additions, 0 deletions
src/unix/newlib/arm/mod.rs
src/unix/newlib/mod.rs
+0
-25
0 additions, 25 deletions
src/unix/newlib/mod.rs
with
58 additions
and
25 deletions
src/unix/newlib/aarch64/mod.rs
+
28
−
0
View file @
fd037479
...
...
@@ -3,3 +3,31 @@ pub type wchar_t = u32;
pub
type
c_long
=
i64
;
pub
type
c_ulong
=
u64
;
s!
{
pub
struct
sockaddr
{
pub
sa_len
:
u8
,
pub
sa_family
:
::
sa_family_t
,
pub
sa_data
:
[::
c_char
;
14
],
}
pub
struct
sockaddr_in6
{
pub
sin6_len
:
u8
,
pub
sin6_family
:
::
sa_family_t
,
pub
sin6_port
:
::
in_port_t
,
pub
sin6_flowinfo
:
u32
,
pub
sin6_addr
:
::
in6_addr
,
pub
sin6_scope_id
:
u32
,
}
pub
struct
sockaddr_in
{
pub
sin_len
:
u8
,
pub
sin_family
:
::
sa_family_t
,
pub
sin_port
:
::
in_port_t
,
pub
sin_addr
:
::
in_addr
,
pub
sin_zero
:
[::
c_char
;
8
],
}
}
pub
const
POLLOUT
:
::
c_short
=
0x4
;
pub
const
POLLHUP
:
::
c_short
=
0x10
;
This diff is collapsed.
Click to expand it.
src/unix/newlib/arm/mod.rs
+
30
−
0
View file @
fd037479
...
...
@@ -3,3 +3,33 @@ pub type wchar_t = u32;
pub
type
c_long
=
i32
;
pub
type
c_ulong
=
u32
;
s!
{
pub
struct
sockaddr
{
pub
sa_family
:
::
sa_family_t
,
pub
sa_data
:
[::
c_char
;
14
],
}
pub
struct
sockaddr_in6
{
pub
sin6_family
:
::
sa_family_t
,
pub
sin6_port
:
::
in_port_t
,
pub
sin6_flowinfo
:
u32
,
pub
sin6_addr
:
::
in6_addr
,
pub
sin6_scope_id
:
u32
,
}
pub
struct
sockaddr_in
{
pub
sin_family
:
::
sa_family_t
,
pub
sin_port
:
::
in_port_t
,
pub
sin_addr
:
::
in_addr
,
pub
sin_zero
:
[
u8
;
8
],
}
pub
struct
sockaddr_storage
{
pub
ss_family
:
::
sa_family_t
,
pub
__ss_padding
:
[
u8
;
26
],
}
}
pub
const
POLLOUT
:
::
c_short
=
0x10
;
pub
const
POLLHUP
:
::
c_short
=
0x4
;
This diff is collapsed.
Click to expand it.
src/unix/newlib/mod.rs
+
0
−
25
View file @
fd037479
...
...
@@ -25,29 +25,6 @@ pub type time_t = i32;
pub
type
useconds_t
=
u32
;
s!
{
pub
struct
sockaddr
{
pub
sa_len
:
u8
,
pub
sa_family
:
sa_family_t
,
pub
sa_data
:
[::
c_char
;
14
],
}
pub
struct
sockaddr_in6
{
pub
sin6_len
:
u8
,
pub
sin6_family
:
sa_family_t
,
pub
sin6_port
:
::
in_port_t
,
pub
sin6_flowinfo
:
u32
,
pub
sin6_addr
:
::
in6_addr
,
pub
sin6_scope_id
:
u32
,
}
pub
struct
sockaddr_in
{
pub
sin_len
:
u8
,
pub
sin_family
:
::
sa_family_t
,
pub
sin_port
:
::
in_port_t
,
pub
sin_addr
:
::
in_addr
,
pub
sin_zero
:
[::
c_char
;
8
],
}
pub
struct
addrinfo
{
pub
ai_flags
:
::
c_int
,
pub
ai_family
:
::
c_int
,
...
...
@@ -389,9 +366,7 @@ pub const O_CLOEXEC: ::c_int = 0x80000;
pub
const
POLLIN
:
::
c_short
=
0x1
;
pub
const
POLLPRI
:
::
c_short
=
0x2
;
pub
const
POLLOUT
:
::
c_short
=
0x4
;
pub
const
POLLERR
:
::
c_short
=
0x8
;
pub
const
POLLHUP
:
::
c_short
=
0x10
;
pub
const
POLLNVAL
:
::
c_short
=
0x20
;
pub
const
RTLD_LAZY
:
::
c_int
=
0x1
;
...
...
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