From 16840d1d9b60d9b2fc0c948f05e23bf2acde34b2 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Thu, 4 Jul 2024 22:31:24 +0200 Subject: [PATCH] fix API mistake for `open` syscall This is poorly documented, so a common mistake (especially on Linux). Getting this ABI wrong will lead to subtle bugs on many platforms. --- src/unix.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix.jl b/src/unix.jl index 29ec298..fa337a9 100644 --- a/src/unix.jl +++ b/src/unix.jl @@ -104,7 +104,7 @@ umask(mask::Integer) = ccall(:umask, mode_t, (mode_t,), mask) _open(path::AbstractString, flags::Integer, mode::Integer) = - ccall(:open, Cint, (Cstring, Cint, mode_t), path, flags, mode) + ccall(:open, Cint, (Cstring, Cint, mode_t...), path, flags, mode) _creat(path::AbstractString, mode::Integer) = _open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)