Skip to content

Commit 667ee8a

Browse files
committed
openbsd has dirent d_namlen field now
1 parent a545eac commit 667ee8a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libstd/sys/unix/fs.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ impl DirEntry {
204204

205205
#[cfg(any(target_os = "macos",
206206
target_os = "ios",
207-
target_os = "netbsd"))]
207+
target_os = "netbsd",
208+
target_os = "openbsd"))]
208209
fn name_bytes(&self) -> &[u8] {
209210
unsafe {
210211
::slice::from_raw_parts(self.entry.d_name.as_ptr() as *const u8,
@@ -213,8 +214,7 @@ impl DirEntry {
213214
}
214215
#[cfg(any(target_os = "freebsd",
215216
target_os = "dragonfly",
216-
target_os = "bitrig",
217-
target_os = "openbsd"))]
217+
target_os = "bitrig"))]
218218
fn name_bytes(&self) -> &[u8] {
219219
unsafe {
220220
::slice::from_raw_parts(self.entry.d_name.as_ptr() as *const u8,

0 commit comments

Comments
 (0)