Skip to content

Commit

Permalink
fix wrong definition of curl_socket_t on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Oct 21, 2021
1 parent bb64db9 commit 8a32089
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Curl/Curl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ using LibCURL: curl_off_t
const CURLE_PEER_FAILED_VERIFICATION = 60
const CURLSSLOPT_REVOKE_BEST_EFFORT = 1 << 3

# this is incorrectly defined by LibCURL:
const curl_socket_t = Sys.iswindows() ? Base.OS_HANDLE : Cint

# definitions affected by incorrect curl_socket_t:
function curl_multi_socket_action(multi_handle, s, ev_bitmask, running_handles)
ccall((:curl_multi_socket_action, LibCURL.libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Cint, Ptr{Cint}), multi_handle, s, ev_bitmask, running_handles)
end
function curl_multi_assign(multi_handle, sockfd, sockp)
ccall((:curl_multi_assign, LibCURL.libcurl), CURLMcode, (Ptr{CURLM}, curl_socket_t, Ptr{Cvoid}), multi_handle, sockfd, sockp)
end

using FileWatching
using NetworkOptions
using Base: OS_HANDLE, preserve_handle, unpreserve_handle
Expand Down

0 comments on commit 8a32089

Please sign in to comment.