diff --git a/basis/io/unix/files/bsd/bsd.factor b/basis/io/unix/files/bsd/bsd.factor index 18e713af2f..3c94baa39a 100644 --- a/basis/io/unix/files/bsd/bsd.factor +++ b/basis/io/unix/files/bsd/bsd.factor @@ -13,5 +13,8 @@ M: bsd stat>file-info ( stat -- file-info ) { [ stat-st_flags >>flags ] [ stat-st_gen >>gen ] - [ stat-st_birthtimespec timespec>unix-time >>birth-time ] + [ + stat-st_birthtimespec timespec>unix-time + >>birth-time + ] } cleave ; diff --git a/basis/io/unix/files/files.factor b/basis/io/unix/files/files.factor index 67da640b71..2b85420ee9 100644 --- a/basis/io/unix/files/files.factor +++ b/basis/io/unix/files/files.factor @@ -142,7 +142,9 @@ os { [ opendir dup [ (io-error) ] unless ] dip dupd curry swap '[ _ closedir io-error ] [ ] cleanup ; inline -: find-next-file ( DIR* -- byte-array ) +HOOK: find-next-file os ( DIR* -- byte-array ) + +M: unix find-next-file ( DIR* -- byte-array ) "dirent" f [ readdir_r 0 = [ (io-error) ] unless ] 2keep @@ -159,6 +161,8 @@ M: unix (directory-entries) ( path -- seq ) [ drop ] produce ] with-unix-directory ; +os openbsd = [ "io.unix.files.openbsd" require ] when +