Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing net/if.h and net/if_mib.h items #2556

Merged
merged 1 commit into from Nov 23, 2021

Conversation

GuillaumeGomez
Copy link
Member

No description provided.

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@GuillaumeGomez
Copy link
Member Author

I don't understand the error:

error: function is never used: `if_freenameindex`
    --> src/unix/bsd/freebsdlike/freebsd/mod.rs:3302:5
     |
3302 |     pub fn if_freenameindex(arg: *mut if_nameindex);
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
note: the lint level is defined here
    --> src/lib.rs:18:38
     |
18   | #![cfg_attr(libc_deny_warnings, deny(warnings))]
     |                                      ^^^^^^^^
     = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`
error: function is never used: `if_indextoname`
    --> src/unix/bsd/freebsdlike/freebsd/mod.rs:3303:5
     |
3303 |     pub fn if_indextoname(arg1: ::c_uint, arg2: *mut ::c_char) -> *mut ::c_char;
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: function is never used: `if_nameindex`
    --> src/unix/bsd/freebsdlike/freebsd/mod.rs:3304:5
     |
3304 |     pub fn if_nameindex() -> *mut if_nameindex;
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: function is never used: `if_nametoindex`
    --> src/unix/bsd/freebsdlike/freebsd/mod.rs:3305:5
     |
3305 |     pub fn if_nametoindex(arg: *const ::c_char) -> ::c_uint;
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some other functions from the same extern block are reexported without issues. What am I missing here?

@JohnTitor
Copy link
Member

They're already declared:

libc/src/unix/bsd/mod.rs

Lines 631 to 632 in e1eb972

pub fn if_nameindex() -> *mut if_nameindex;
pub fn if_freenameindex(ptr: *mut if_nameindex);

@GuillaumeGomez
Copy link
Member Author

Nice!

@GuillaumeGomez
Copy link
Member Author

CI passed! \o/

@Amanieu
Copy link
Member

Amanieu commented Nov 21, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 21, 2021

📌 Commit bd63ccb has been approved by Amanieu

bors added a commit that referenced this pull request Nov 21, 2021
Add missing net/if.h and net/if_mib.h items
@bors
Copy link
Contributor

bors commented Nov 21, 2021

⌛ Testing commit bd63ccb with merge 4a423ab...

@bors
Copy link
Contributor

bors commented Nov 21, 2021

💔 Test failed - checks-actions

@GuillaumeGomez
Copy link
Member Author

I updated the debug and the checks by using slices (would have been much simpler if as_slice was implemented much earlier in rust T_T).

@Amanieu
Copy link
Member

Amanieu commented Nov 23, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 23, 2021

📌 Commit bab20a8 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Nov 23, 2021

⌛ Testing commit bab20a8 with merge dd76900...

@bors
Copy link
Contributor

bors commented Nov 23, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing dd76900 to master...

@bors bors merged commit dd76900 into rust-lang:master Nov 23, 2021
@GuillaumeGomez GuillaumeGomez deleted the net-if branch November 23, 2021 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants