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
0a5dcf02
Commit
0a5dcf02
authored
9 years ago
by
Kamal Marhubi
Browse files
Options
Downloads
Patches
Plain Diff
unix: Add if_indextoname and IF_NAMESIZE
parent
aa4e1b58
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
src/unix/mod.rs
+3
-0
3 additions, 0 deletions
src/unix/mod.rs
with
3 additions
and
0 deletions
src/unix/mod.rs
+
3
−
0
View file @
0a5dcf02
...
...
@@ -129,6 +129,8 @@ pub const POLLERR: ::c_short = 0x8;
pub
const
POLLHUP
:
::
c_short
=
0x10
;
pub
const
POLLNVAL
:
::
c_short
=
0x20
;
pub
const
IF_NAMESIZE
:
::
size_t
=
16
;
cfg_if!
{
if
#[cfg(feature
=
"default"
)]
{
// cargo build, don't pull in anything extra as the libstd dep
...
...
@@ -363,6 +365,7 @@ extern {
pub
fn
munmap
(
addr
:
*
mut
::
c_void
,
len
:
::
size_t
)
->
::
c_int
;
pub
fn
if_nametoindex
(
ifname
:
*
const
c_char
)
->
::
c_uint
;
pub
fn
if_indextoname
(
ifindex
:
::
c_uint
,
ifname
:
*
mut
::
c_char
)
->
*
mut
::
c_char
;
#[cfg_attr(target_os
=
"macos"
,
link_name
=
"lstat$INODE64"
)]
#[cfg_attr(target_os
=
"netbsd"
,
link_name
=
"__lstat50"
)]
...
...
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