Skip to content

Commit acb184c

Browse files
add hurd and bsd implementations
1 parent 87ca6bc commit acb184c

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,6 +1586,8 @@ extern "C" {
15861586
) -> c_int;
15871587

15881588
pub fn closefrom(lowfd: c_int) -> c_int;
1589+
1590+
pub fn getdents(fd: c_int, buf: *mut c_char, nbytes: c_int) -> c_int;
15891591
}
15901592

15911593
#[link(name = "rt")]

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4818,6 +4818,10 @@ cfg_if! {
48184818
}
48194819
}
48204820

4821+
extern "C" {
4822+
pub fn getdents(fd: c_int, buf: *mut c_char, nbytes: usize) -> isize;
4823+
}
4824+
48214825
extern "C" {
48224826
#[cfg_attr(doc, doc(alias = "__errno_location"))]
48234827
#[cfg_attr(doc, doc(alias = "errno"))]

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2957,6 +2957,8 @@ extern "C" {
29572957
pub fn flags_to_string(flags: c_ulong, def: *const c_char) -> c_int;
29582958

29592959
pub fn kinfo_getvmmap(pid: crate::pid_t, cntp: *mut size_t) -> *mut kinfo_vmentry;
2960+
2961+
pub fn getdents(fd: c_int, buf: *mut c_char, nbytes: usize) -> c_int;
29602962
}
29612963

29622964
#[link(name = "execinfo")]

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2074,6 +2074,8 @@ extern "C" {
20742074
pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int;
20752075
pub fn getmntinfo(mntbufp: *mut *mut crate::statfs, flags: c_int) -> c_int;
20762076
pub fn getfsstat(buf: *mut statfs, bufsize: size_t, flags: c_int) -> c_int;
2077+
2078+
pub fn getdents(fd: c_int, buf: *mut c_void, nbytes: usize) -> c_int;
20772079
}
20782080

20792081
#[link(name = "execinfo")]

src/unix/hurd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4282,6 +4282,8 @@ extern "C" {
42824282
pub fn seekdir(dirp: *mut crate::DIR, loc: c_long);
42834283
pub fn telldir(dirp: *mut crate::DIR) -> c_long;
42844284

4285+
pub fn getdents64(fd: c_int, buf: *mut c_void, nbytes: usize) -> isize;
4286+
42854287
pub fn dirfd(dirp: *mut crate::DIR) -> c_int;
42864288

42874289
#[link_name = "__xpg_strerror_r"]

0 commit comments

Comments
 (0)