Skip to content

Commit 6549459

Browse files
vchuravyKristofferC
authored andcommitted
Make :open ccall use variadic cconv (#49212)
(cherry picked from commit 1eee6ef)
1 parent 927cd05 commit 6549459

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

base/file.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ if Sys.iswindows()
9999
end
100100
else
101101
function cd(f::Function, dir::AbstractString)
102-
fd = ccall(:open, Int32, (Cstring, Int32), :., 0)
102+
fd = ccall(:open, Int32, (Cstring, Int32, UInt32...), :., 0)
103103
systemerror(:open, fd == -1)
104104
try
105105
cd(dir)

test/file.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,7 +1229,7 @@ let f = open(file, "w")
12291229
if Sys.iswindows()
12301230
f = RawFD(ccall(:_open, Cint, (Cstring, Cint), file, Base.Filesystem.JL_O_RDONLY))
12311231
else
1232-
f = RawFD(ccall(:open, Cint, (Cstring, Cint), file, Base.Filesystem.JL_O_RDONLY))
1232+
f = RawFD(ccall(:open, Cint, (Cstring, Cint, UInt32...), file, Base.Filesystem.JL_O_RDONLY))
12331233
end
12341234
test_LibcFILE(Libc.FILE(f, Libc.modestr(true, false)))
12351235
end

test/testhelpers/FakePTYs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function open_fake_pty()
3939
rc = ccall(:unlockpt, Cint, (Cint,), fdm)
4040
rc != 0 && error("unlockpt")
4141

42-
fds = ccall(:open, Cint, (Ptr{UInt8}, Cint),
42+
fds = ccall(:open, Cint, (Ptr{UInt8}, Cint, UInt32...),
4343
ccall(:ptsname, Ptr{UInt8}, (Cint,), fdm), O_RDWR | O_NOCTTY)
4444

4545
pts = RawFD(fds)

0 commit comments

Comments
 (0)