add #[allow(deprecated)] annotations

allow using deprecated functions and data structures
in deprecated functions
This commit is contained in:
sourceturner
2026-04-19 21:51:46 +02:00
committed by sourceturner
parent 885118ccac
commit 4ffd337b9b
12 changed files with 67 additions and 19 deletions
+4 -1
View File
@@ -145,7 +145,10 @@ pub extern "C" fn inet_netof(r#in: in_addr) -> in_addr_t {
#[deprecated]
#[unsafe(no_mangle)]
pub unsafe extern "C" fn inet_network(cp: *const c_char) -> in_addr_t {
ntohl(unsafe { inet_addr(cp) })
ntohl(unsafe {
#[allow(deprecated)]
inet_addr(cp)
})
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/inet_addr.html>.