Skip to content

Commit 1eee6ef

Browse files
authored
Make :open ccall use variadic cconv (#49212)
1 parent 7618e64 commit 1eee6ef

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
@@ -105,7 +105,7 @@ if Sys.iswindows()
105105
end
106106
else
107107
function cd(f::Function, dir::AbstractString)
108-
fd = ccall(:open, Int32, (Cstring, Int32), :., 0)
108+
fd = ccall(:open, Int32, (Cstring, Int32, UInt32...), :., 0)
109109
systemerror(:open, fd == -1)
110110
try
111111
cd(dir)

test/file.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ let f = open(file, "w")
12531253
if Sys.iswindows()
12541254
f = RawFD(ccall(:_open, Cint, (Cstring, Cint), file, Base.Filesystem.JL_O_RDONLY))
12551255
else
1256-
f = RawFD(ccall(:open, Cint, (Cstring, Cint), file, Base.Filesystem.JL_O_RDONLY))
1256+
f = RawFD(ccall(:open, Cint, (Cstring, Cint, UInt32...), file, Base.Filesystem.JL_O_RDONLY))
12571257
end
12581258
test_LibcFILE(Libc.FILE(f, Libc.modestr(true, false)))
12591259
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
pts = RawFD(fds)
4545

0 commit comments

Comments
 (0)