Submitted By: Agathoklis Hatzimanikas (ag at linuxfromscratch dot org)
Date: 2008-12-27
Initial Package Version: 1.4.9
Origin: Upstream
Upstream Status: Applied
Description: Fixes compilation problem, when curl is already installed
diff -Naur gnupg-1.4.9.orig/keyserver/gpgkeys_curl.c gnupg-1.4.9/keyserver/gpgkeys_curl.c
old
|
new
|
|
1 | 1 | /* gpgkeys_curl.c - fetch a key via libcurl |
2 | | * Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. |
| 2 | * Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
3 | 3 | * |
4 | 4 | * This file is part of GnuPG. |
5 | 5 | * |
… |
… |
|
42 | 42 | #else |
43 | 43 | #include "curl-shim.h" |
44 | 44 | #endif |
45 | | #include "compat.h" |
46 | 45 | #include "keyserver.h" |
47 | 46 | #include "ksutil.h" |
48 | 47 | |
… |
… |
|
203 | 202 | |
204 | 203 | option[MAX_OPTION]='\0'; |
205 | 204 | |
206 | | if(ascii_strncasecmp(option,"no-",3)==0) |
| 205 | if(strncasecmp(option,"no-",3)==0) |
207 | 206 | { |
208 | 207 | no=1; |
209 | 208 | start=&option[3]; |
210 | 209 | } |
211 | 210 | |
212 | | if(ascii_strncasecmp(start,"http-proxy",10)==0) |
| 211 | if(strncasecmp(start,"http-proxy",10)==0) |
213 | 212 | { |
214 | 213 | /* Safe to not check the return code of strdup() here. |
215 | 214 | If it fails, we simply won't use a proxy. */ |
… |
… |
|
227 | 226 | } |
228 | 227 | } |
229 | 228 | } |
230 | | else if(ascii_strncasecmp(start,"follow-redirects",16)==0) |
| 229 | else if(strncasecmp(start,"follow-redirects",16)==0) |
231 | 230 | { |
232 | 231 | if(no) |
233 | 232 | follow_redirects=0; |
… |
… |
|
274 | 273 | print a nicer error message. */ |
275 | 274 | curldata=curl_version_info(CURLVERSION_NOW); |
276 | 275 | for(i=0;curldata->protocols[i];i++) |
277 | | if(ascii_strcasecmp(curldata->protocols[i],opt->scheme)==0) |
| 276 | if(strcasecmp(curldata->protocols[i],opt->scheme)==0) |
278 | 277 | break; |
279 | 278 | |
280 | 279 | if(curldata->protocols[i]==NULL) |
… |
… |
|
286 | 285 | |
287 | 286 | if(follow_redirects) |
288 | 287 | { |
289 | | curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1); |
| 288 | curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1L); |
290 | 289 | if(follow_redirects>0) |
291 | 290 | curl_easy_setopt(curl,CURLOPT_MAXREDIRS,follow_redirects); |
292 | 291 | } |
… |
… |
|
298 | 297 | { |
299 | 298 | fprintf(console,"gpgkeys: curl version = %s\n",curl_version()); |
300 | 299 | curl_easy_setopt(curl,CURLOPT_STDERR,console); |
301 | | curl_easy_setopt(curl,CURLOPT_VERBOSE,1); |
| 300 | curl_easy_setopt(curl,CURLOPT_VERBOSE,1L); |
302 | 301 | } |
303 | 302 | |
304 | | curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert); |
| 303 | curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert); |
305 | 304 | curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file); |
306 | 305 | |
307 | 306 | if(proxy) |