http: use a feature check to enable GSSAPI delegation control
Turn the version check into a feature check to ensure this functionality is also enabled with vendor supported curl versions where the feature may have been backported. Signed-off-by: Tom G. Christensen <tgc@jupiterrise.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tom G. Christensen committed
Aug 11, 2017 at 18:37 UTC
dd5df538b501661f60ffed3eb8486b9eed138c48
1 file changed
+3
-3
http.c
+3
-3
@@ -91,7 +91,7 @@ static struct {
91
* here, too
92
*/
93
};
94
-#if LIBCURL_VERSION_NUM >= 0x071600
94
+#ifdef CURLGSSAPI_DELEGATION_FLAG
95
static const char *curl_deleg;
96
static struct {
97
const char *name;
@@ -352,7 +352,7 @@ static int http_options(const char *var, const char *value, void *cb)
352
}
353
354
if (!strcmp("http.delegation", var)) {
355
-#if LIBCURL_VERSION_NUM >= 0x071600
355
+#ifdef CURLGSSAPI_DELEGATION_FLAG
356
return git_config_string(&curl_deleg, var, value);
357
#else
358
warning(_("Delegation control is not supported with cURL < 7.22.0"));
@@ -719,7 +719,7 @@ static CURL *get_curl_handle(void)
719
curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
720
#endif
721
722
-#if LIBCURL_VERSION_NUM >= 0x071600
722
+#ifdef CURLGSSAPI_DELEGATION_FLAG
723
if (curl_deleg) {
724
int i;
725
for (i = 0; i < ARRAY_SIZE(curl_deleg_levels); i++) {