Skip to content

Commit 1501cad

Browse files
committed
DragonFly's devname_r takes a size_t len parameter
1 parent 90ebf43 commit 1501cad

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

src/unix/bsd/freebsdlike/dragonfly/mod.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,14 @@ extern "C" {
13631363

13641364
pub fn aio_waitcomplete(iocbp: *mut *mut aiocb, timeout: *mut ::timespec) -> ::c_int;
13651365

1366+
#[deprecated(since = "0.2.107", note = "len should be of type size_t")]
1367+
pub fn devname_r(
1368+
dev: ::dev_t,
1369+
mode: ::mode_t,
1370+
buf: *mut ::c_char,
1371+
len: ::c_int,
1372+
) -> *mut ::c_char;
1373+
13661374
pub fn waitid(
13671375
idtype: idtype_t,
13681376
id: ::id_t,

src/unix/bsd/freebsdlike/freebsd/mod.rs

+7
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,13 @@ extern "C" {
20092009
) -> ::c_int;
20102010
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
20112011

2012+
pub fn devname_r(
2013+
dev: ::dev_t,
2014+
mode: ::mode_t,
2015+
buf: *mut ::c_char,
2016+
len: ::c_int,
2017+
) -> *mut ::c_char;
2018+
20122019
pub fn extattr_delete_fd(
20132020
fd: ::c_int,
20142021
attrnamespace: ::c_int,

src/unix/bsd/freebsdlike/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1417,12 +1417,6 @@ extern "C" {
14171417
pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int;
14181418

14191419
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
1420-
pub fn devname_r(
1421-
dev: ::dev_t,
1422-
mode: ::mode_t,
1423-
buf: *mut ::c_char,
1424-
len: ::c_int,
1425-
) -> *mut ::c_char;
14261420
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;
14271421
pub fn accept4(
14281422
s: ::c_int,

0 commit comments

Comments
 (0)