Ticket #2663: gnupg-1.4.9_curl-1.patch

File gnupg-1.4.9_curl-1.patch, 2.5 KB (added by Ag. Hatzimanikas, 15 years ago)
  • keyserver/gpgkeys_curl.c

    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  
    11/* 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.
    33 *
    44 * This file is part of GnuPG.
    55 *
     
    4242#else
    4343#include "curl-shim.h"
    4444#endif
    45 #include "compat.h"
    4645#include "keyserver.h"
    4746#include "ksutil.h"
    4847
     
    203202
    204203          option[MAX_OPTION]='\0';
    205204
    206           if(ascii_strncasecmp(option,"no-",3)==0)
     205          if(strncasecmp(option,"no-",3)==0)
    207206            {
    208207              no=1;
    209208              start=&option[3];
    210209            }
    211210
    212           if(ascii_strncasecmp(start,"http-proxy",10)==0)
     211          if(strncasecmp(start,"http-proxy",10)==0)
    213212            {
    214213              /* Safe to not check the return code of strdup() here.
    215214                 If it fails, we simply won't use a proxy. */
     
    227226                    }
    228227                }
    229228            }
    230           else if(ascii_strncasecmp(start,"follow-redirects",16)==0)
     229          else if(strncasecmp(start,"follow-redirects",16)==0)
    231230            {
    232231              if(no)
    233232                follow_redirects=0;
     
    274273     print a nicer error message. */
    275274  curldata=curl_version_info(CURLVERSION_NOW);
    276275  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)
    278277      break;
    279278
    280279  if(curldata->protocols[i]==NULL)
     
    286285
    287286  if(follow_redirects)
    288287    {
    289       curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1);
     288      curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1L);
    290289      if(follow_redirects>0)
    291290        curl_easy_setopt(curl,CURLOPT_MAXREDIRS,follow_redirects);
    292291    }
     
    298297    {
    299298      fprintf(console,"gpgkeys: curl version = %s\n",curl_version());
    300299      curl_easy_setopt(curl,CURLOPT_STDERR,console);
    301       curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
     300      curl_easy_setopt(curl,CURLOPT_VERBOSE,1L);
    302301    }
    303302
    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);
    305304  curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file);
    306305
    307306  if(proxy)