http: don't hardcode the value of CURL_SOCKOPT_OK
Use the new git-curl-compat.h header to define CURL_SOCKOPT_OK to its
known value if we're on an older curl version that doesn't have it. It
was hardcoded in http.c in a15d069a19 (http: enable keepalive on TCP
sockets, 2013-10-12).
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
e4ff3b67c2
commit
32da6e6daf
2
http.c
2
http.c
@ -537,7 +537,7 @@ static int sockopt_callback(void *client, curl_socket_t fd, curlsocktype type)
|
||||
if (rc < 0)
|
||||
warning_errno("unable to set SO_KEEPALIVE on socket");
|
||||
|
||||
return 0; /* CURL_SOCKOPT_OK only exists since curl 7.21.5 */
|
||||
return CURL_SOCKOPT_OK;
|
||||
}
|
||||
|
||||
static void set_curl_keepalive(CURL *c)
|
||||
|
||||
Reference in New Issue
Block a user