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
dcf20b75
Commit
dcf20b75
authored
6 years ago
by
gnzlbg
Browse files
Options
Downloads
Patches
Plain Diff
Fix DragonflyBSD build
parent
0ffba9f9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/unix/bsd/freebsdlike/dragonfly/mod.rs
+59
-52
59 additions, 52 deletions
src/unix/bsd/freebsdlike/dragonfly/mod.rs
with
59 additions
and
52 deletions
src/unix/bsd/freebsdlike/dragonfly/mod.rs
+
59
−
52
View file @
dcf20b75
...
@@ -31,23 +31,6 @@ s! {
...
@@ -31,23 +31,6 @@ s! {
pub
e_exit
:
u16
pub
e_exit
:
u16
}
}
pub
struct
utmpx
{
pub
ut_name
:
[::
c_char
;
32
],
pub
ut_id
:
[::
c_char
;
4
],
pub
ut_line
:
[::
c_char
;
32
],
pub
ut_host
:
[::
c_char
;
256
],
pub
ut_unused
:
[
u8
;
16
],
pub
ut_session
:
u16
,
pub
ut_type
:
u16
,
pub
ut_pid
:
::
pid_t
,
ut_exit
:
exit_status
,
ut_ss
:
::
sockaddr_storage
,
pub
ut_tv
:
::
timeval
,
pub
ut_unused2
:
[
u8
;
16
],
}
pub
struct
aiocb
{
pub
struct
aiocb
{
pub
aio_fildes
:
::
c_int
,
pub
aio_fildes
:
::
c_int
,
pub
aio_offset
:
::
off_t
,
pub
aio_offset
:
::
off_t
,
...
@@ -60,15 +43,6 @@ s! {
...
@@ -60,15 +43,6 @@ s! {
_aio_err
:
::
c_int
_aio_err
:
::
c_int
}
}
pub
struct
dirent
{
pub
d_fileno
:
::
ino_t
,
pub
d_namlen
:
u16
,
pub
d_type
:
u8
,
__unused1
:
u8
,
__unused2
:
u32
,
pub
d_name
:
[::
c_char
;
256
],
}
pub
struct
uuid
{
pub
struct
uuid
{
pub
time_low
:
u32
,
pub
time_low
:
u32
,
pub
time_mid
:
u16
,
pub
time_mid
:
u16
,
...
@@ -120,27 +94,6 @@ s! {
...
@@ -120,27 +94,6 @@ s! {
pub
f_uid_uuid
:
::
uuid_t
,
pub
f_uid_uuid
:
::
uuid_t
,
}
}
pub
struct
statfs
{
pub
f_bsize
:
::
c_long
,
pub
f_iosize
:
::
c_long
,
pub
f_blocks
:
::
c_long
,
pub
f_bfree
:
::
c_long
,
pub
f_bavail
:
::
c_long
,
pub
f_files
:
::
c_long
,
pub
f_ffree
:
::
c_long
,
pub
f_fsid
:
::
fsid_t
,
pub
f_owner
:
::
uid_t
,
pub
f_type
:
::
int32_t
,
pub
f_flags
:
::
int32_t
,
pub
f_syncwrites
:
::
c_long
,
pub
f_asyncwrites
:
::
c_long
,
pub
f_fstypename
:
[::
c_char
;
16
],
pub
f_mntonname
:
[::
c_char
;
90
],
pub
f_syncreads
:
::
c_long
,
pub
f_asyncreads
:
::
c_long
,
pub
f_mntfromname
:
[::
c_char
;
90
],
}
pub
struct
stat
{
pub
struct
stat
{
pub
st_ino
:
::
ino_t
,
pub
st_ino
:
::
ino_t
,
pub
st_nlink
:
::
nlink_t
,
pub
st_nlink
:
::
nlink_t
,
...
@@ -223,6 +176,58 @@ s! {
...
@@ -223,6 +176,58 @@ s! {
}
}
}
}
s_no_extra_traits!
{
#[allow(missing_debug_implementations)]
pub
struct
utmpx
{
pub
ut_name
:
[::
c_char
;
32
],
pub
ut_id
:
[::
c_char
;
4
],
pub
ut_line
:
[::
c_char
;
32
],
pub
ut_host
:
[::
c_char
;
256
],
pub
ut_unused
:
[
u8
;
16
],
pub
ut_session
:
u16
,
pub
ut_type
:
u16
,
pub
ut_pid
:
::
pid_t
,
ut_exit
:
exit_status
,
ut_ss
:
::
sockaddr_storage
,
pub
ut_tv
:
::
timeval
,
pub
ut_unused2
:
[
u8
;
16
],
}
#[allow(missing_debug_implementations)]
pub
struct
dirent
{
pub
d_fileno
:
::
ino_t
,
pub
d_namlen
:
u16
,
pub
d_type
:
u8
,
__unused1
:
u8
,
__unused2
:
u32
,
pub
d_name
:
[::
c_char
;
256
],
}
#[allow(missing_debug_implementations)]
pub
struct
statfs
{
pub
f_bsize
:
::
c_long
,
pub
f_iosize
:
::
c_long
,
pub
f_blocks
:
::
c_long
,
pub
f_bfree
:
::
c_long
,
pub
f_bavail
:
::
c_long
,
pub
f_files
:
::
c_long
,
pub
f_ffree
:
::
c_long
,
pub
f_fsid
:
::
fsid_t
,
pub
f_owner
:
::
uid_t
,
pub
f_type
:
::
int32_t
,
pub
f_flags
:
::
int32_t
,
pub
f_syncwrites
:
::
c_long
,
pub
f_asyncwrites
:
::
c_long
,
pub
f_fstypename
:
[::
c_char
;
16
],
pub
f_mntonname
:
[::
c_char
;
90
],
pub
f_syncreads
:
::
c_long
,
pub
f_asyncreads
:
::
c_long
,
pub
f_mntfromname
:
[::
c_char
;
90
],
}
}
pub
const
RAND_MAX
:
::
c_int
=
0x7fff_ffff
;
pub
const
RAND_MAX
:
::
c_int
=
0x7fff_ffff
;
pub
const
PTHREAD_STACK_MIN
:
::
size_t
=
16384
;
pub
const
PTHREAD_STACK_MIN
:
::
size_t
=
16384
;
pub
const
SIGSTKSZ
:
::
size_t
=
40960
;
pub
const
SIGSTKSZ
:
::
size_t
=
40960
;
...
@@ -804,26 +809,28 @@ f! {
...
@@ -804,26 +809,28 @@ f! {
}
}
pub
fn
CMSG_LEN
(
length
:
::
c_uint
)
->
::
c_uint
{
pub
fn
CMSG_LEN
(
length
:
::
c_uint
)
->
::
c_uint
{
_CMSG_ALIGN
(::
mem
::
size_of
::
<
::
cmsghdr
>
())
+
length
as
usize
(
_CMSG_ALIGN
(::
mem
::
size_of
::
<
::
cmsghdr
>
())
+
length
as
usize
)
as
::
c_uint
}
}
pub
fn
CMSG_NXTHDR
(
mhdr
:
*
const
::
msghdr
,
cmsg
:
*
const
::
cmsghdr
)
pub
fn
CMSG_NXTHDR
(
mhdr
:
*
const
::
msghdr
,
cmsg
:
*
const
::
cmsghdr
)
->
*
mut
::
cmsghdr
->
*
mut
::
cmsghdr
{
{
let
next
=
cmsg
as
usize
+
_CMSG_ALIGN
((
*
cmsg
)
.cmsg_len
)
let
next
=
cmsg
as
usize
+
_CMSG_ALIGN
((
*
cmsg
)
.cmsg_len
as
usize
)
+
_CMSG_ALIGN
(::
mem
::
size_of
::
<
::
cmsghdr
>
());
+
_CMSG_ALIGN
(::
mem
::
size_of
::
<
::
cmsghdr
>
());
let
max
=
(
*
mhdr
)
.msg_control
as
usize
let
max
=
(
*
mhdr
)
.msg_control
as
usize
+
(
*
mhdr
)
.msg_controllen
as
usize
;
+
(
*
mhdr
)
.msg_controllen
as
usize
;
if
next
<=
max
{
if
next
<=
max
{
(
cmsg
as
usize
+
_CMSG_ALIGN
((
*
cmsg
)
.cmsg_len
))
as
*
mut
::
cmsghdr
(
cmsg
as
usize
+
_CMSG_ALIGN
((
*
cmsg
)
.cmsg_len
as
usize
))
as
*
mut
::
cmsghdr
}
else
{
}
else
{
0
as
*
mut
::
cmsghdr
0
as
*
mut
::
cmsghdr
}
}
}
}
pub
fn
CMSG_SPACE
(
length
:
::
c_uint
)
->
::
c_uint
{
pub
fn
CMSG_SPACE
(
length
:
::
c_uint
)
->
::
c_uint
{
_CMSG_ALIGN
(::
mem
::
size_of
::
<
::
cmsghdr
>
())
+
(
_CMSG_ALIGN
(::
mem
::
size_of
::
<
::
cmsghdr
>
())
+
_CMSG_ALIGN
(
length
as
usize
)
_CMSG_ALIGN
(
length
as
usize
)
)
as
::
c_uint
}
}
}
}
...
...
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