Skip to content
Snippets Groups Projects
Commit 547edcc2 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'arpa_inet-types' into 'master'

Use C type names in byteorder functions

See merge request redox-os/relibc!274
parents 22a7f712 e4a7186b
No related branches found
No related tags found
No related merge requests found
Pipeline #7801 failed
......@@ -16,22 +16,22 @@ use crate::{
};
#[no_mangle]
pub extern "C" fn htonl(hostlong: u32) -> u32 {
pub extern "C" fn htonl(hostlong: uint32_t) -> uint32_t {
hostlong.to_be()
}
#[no_mangle]
pub extern "C" fn htons(hostshort: u16) -> u16 {
pub extern "C" fn htons(hostshort: uint16_t) -> uint16_t {
hostshort.to_be()
}
#[no_mangle]
pub extern "C" fn ntohl(netlong: u32) -> u32 {
pub extern "C" fn ntohl(netlong: uint32_t) -> uint32_t {
u32::from_be(netlong)
}
#[no_mangle]
pub extern "C" fn ntohs(netshort: u16) -> u16 {
pub extern "C" fn ntohs(netshort: uint16_t) -> uint16_t {
u16::from_be(netshort)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment