Skip to content

Commit dbe9a44

Browse files
committed
Fix eio_windows
1 parent 85ffd3d commit dbe9a44

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib_eio_windows/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(name eio_windows)
33
(public_name eio_windows)
44
(library_flags :standard -cclib -lbcrypt -cclib -lntdll)
5-
(enabled_if (= %{os_type} "Win32"))
5+
; (enabled_if (= %{os_type} "Win32"))
66
(foreign_stubs
77
(language c)
88
(include_dirs ../lib_eio/unix/include)

lib_eio_windows/low_level.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ let read_link ?dirfd path =
140140

141141
let chown ?dirfd ~follow:_ ~uid ~gid path =
142142
in_worker_thread @@ fun () ->
143-
Eio_unix.Private.chown ~flags:0 ~uid ~gid dirfd path
143+
match dirfd with
144+
| None -> failwith "Chown is unsupported on Windows"
145+
| Some dirfd -> Eio_unix.Private.chown ~flags:0 ~uid ~gid dirfd path
144146

145147
external eio_readv : Unix.file_descr -> Cstruct.t array -> int = "caml_eio_windows_readv"
146148

0 commit comments

Comments
 (0)